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

Add code lint (flake8, black, and pytype) #17

Merged
merged 14 commits into from
Feb 28, 2023
Merged

Add code lint (flake8, black, and pytype) #17

merged 14 commits into from
Feb 28, 2023

Conversation

petrikvladimir
Copy link
Owner

@petrikvladimir petrikvladimir commented Feb 15, 2023

This PR adds two static code checkers into the repository: flake8, black, and pytype. The code is updated to fit the requirements of both.

@petrikvladimir petrikvladimir changed the title pylint CI Add code lint (flake8 and black) Feb 15, 2023
@petrikvladimir petrikvladimir changed the title Add code lint (flake8 and black) Add code lint (flake8, black, and pytype) Feb 16, 2023
@@ -4,19 +4,27 @@
# Created on: 2022-12-6
# Author: Vladimir Petrik <[email protected]>
#
from __future__ import annotations
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just curious, how are the annotations used? I did not see in the code

Copy link
Owner Author

Choose a reason for hiding this comment

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

It allows using str | None for type annotation instead of Optional[str]. It's supported from python 3.10, __future __ import is needed for backporting this future to python 3.7.

@petrikvladimir petrikvladimir merged commit f5c5f3c into main Feb 28, 2023
@petrikvladimir petrikvladimir deleted the pylint branch February 28, 2023 15:32
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.

2 participants