Skip to content
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

Enable strict mypy checks #76

Merged
merged 4 commits into from
Aug 10, 2021
Merged

Enable strict mypy checks #76

merged 4 commits into from
Aug 10, 2021

Conversation

ludeeus
Copy link
Owner

@ludeeus ludeeus commented Aug 9, 2021

Proposed change

Enable strict mypy checks
replaces #53

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionalit)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass.
  • There is no commented out code in this PR.
  • The code has been formatted using Black (make black)
  • Tests have been added to verify that the new code works.

@ludeeus
Copy link
Owner Author

ludeeus commented Aug 9, 2021

@KapJI can you take a look at this?

Copy link
Contributor

@KapJI KapJI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

In #53 I also added basic isort config, it might be useful to have consistent output for isort and black.

str.__init__(string)

def __new__(cls, version, _=None):
def __new__(cls, version: str, _: Optional[Any] = None) -> "_AwesomeVersionBase":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add from __future__ import annotation to use unquoted type.

Suggested change
def __new__(cls, version: str, _: Optional[Any] = None) -> "_AwesomeVersionBase":
def __new__(cls, version: str, _: Optional[Any] = None) -> _AwesomeVersionBase:

Copy link
Owner Author

@ludeeus ludeeus Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from __future__ import annotation can only be used from python 3.7, this library has support for 3.6 as well.

@ludeeus
Copy link
Owner Author

ludeeus commented Aug 9, 2021

In #53 I also added basic isort config, it might be useful to have consistent output for isort and black.

I did not see that, added that as well now 👍

@ludeeus
Copy link
Owner Author

ludeeus commented Aug 10, 2021

Thanks for looking it over @KapJI 👍

@ludeeus ludeeus merged commit 6d6ffbf into main Aug 10, 2021
@ludeeus ludeeus deleted the mypy branch August 10, 2021 06:54
@ludeeus ludeeus mentioned this pull request Aug 10, 2021
10 tasks
@KapJI KapJI mentioned this pull request Aug 24, 2021
10 tasks
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.

None yet

2 participants