GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove __init__ overloads by last-partizan · Pull Request #86 · sbdchd/django-types

Conversation

@last-partizan

@last-partizan last-partizan commented Jan 20, 2022

Copy link
Copy Markdown

This fixed invalid error:

Argument of type "Literal[True]" cannot be assigned to parameter "null" of type "Literal[False]" in function "init"

I think, maybe other __init__ with overrides also should be fixed? I can include that in this PR or create others. But i worry about breaking something? Why there was overrides for __init__ in the first place?

Refs #85

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@last-partizan

last-partizan commented Jan 21, 2022

Copy link
Copy Markdown
Author

Hmm, it had broken something, good. So there was point in those overrides.

I'm converting this to draft.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@last-partizan
last-partizan marked this pull request as draft January 21, 2022 08:13
@last-partizan
last-partizan force-pushed the main branch from 530d4fb to 23adb10 Compare January 21, 2022 14:53
@last-partizan

last-partizan commented Jan 21, 2022

Copy link
Copy Markdown
Author

I've added failing test case, and it looks like issue with pyright.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@last-partizan last-partizan changed the title fix: Remove overload for ForeignKey.__init__ False positive for argiment mismatch Jan 21, 2022
@last-partizan last-partizan changed the title False positive for argiment mismatch False positive for argument mismatch Jan 21, 2022
@last-partizan
last-partizan force-pushed the main branch 2 times, most recently from fdc566d to 2c27d1e Compare January 23, 2022 09:03
@last-partizan
WIP: Remove overloads from __init__ in related.pyi
4a0fcac
- Add failing case for issue
- Remove overloads
@last-partizan
last-partizan force-pushed the main branch from 2c27d1e to 4a0fcac Compare January 23, 2022 09:04
@last-partizan last-partizan changed the title False positive for argument mismatch Remove __init__ overrides Jan 23, 2022
@last-partizan last-partizan changed the title Remove __init__ overrides Remove __init__ overloads Jan 23, 2022
This was referenced Jan 23, 2022
Remove the overloads for choices and simplify typing #87
Closed
Adding __init__ breaks type inference from __new__ python/mypy#12045
Open
@last-partizan

last-partizan commented Jan 28, 2022

Copy link
Copy Markdown
Author

I'm closing this, until issues with mypy is resolved.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@last-partizan last-partizan closed this Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@last-partizan
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.