Skip to content

Add support for mypy==1.0.0, add docformatter #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 15, 2023
Merged

Conversation

klausweiss
Copy link
Owner

Addresses #2.

This is an ugly hack to walk around the issue thoroughly described here: python/mypy#14653 (comment) and here: mypyc/mypyc#973

Since we can't simply make the equality comparison of fullnames fail by overriding __eq__, we're forcing them to be different by adding a bunch of invisible characters at the end 😬 But ultimately the aim of the plugin is to help humans, to whom the invisible characters are, well, invisible.

I can see how it can hit performance (memory-wise), so if that starts to be a problem for somebody, we can try to throw more invisible characters into the pool and encode the instance_counter with more than one char. We're only using one on purpose now - for simplicity.

The upper bound on the supported mypy versions is because of the new release versioning scheme announced. The plugin is prone to be affected even by minor backward incompatible changes.

@klausweiss klausweiss merged commit 2e69508 into master Feb 15, 2023
@klausweiss klausweiss deleted the mypy-1.0.0 branch February 15, 2023 22:46
klausweiss added a commit that referenced this pull request Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant