-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Issue #1891 #1899
base: master
Are you sure you want to change the base?
Issue #1891 #1899
Conversation
2d5189f
to
3fb65a1
Compare
92c5ad5
to
86e8454
Compare
@sobolevn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! Please, take a look at my questions 👍
setup.cfg
Outdated
@@ -127,6 +127,9 @@ rules = | |||
"sys_version_info < (3, 9)": py-lt-39 | |||
"sys_version_info >= (3, 9)": py-gte-39 | |||
|
|||
"exec('import os') or not os.name == 'nt'": not-win |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can reuse existing features from https://github.com/wemake-services/coverage-conditional-plugin/#writing-pragma-rules and https://www.python.org/dev/peps/pep-0496/#id9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.github/workflows/test.yml
Outdated
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
python-version: [ 3.6, 3.7, 3.8, 3.9 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python-version: [ 3.6, 3.7, 3.8, 3.9 ] | |
python-version: [3.6, 3.7, 3.8, 3.9] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.github/workflows/test.yml
Outdated
with: | ||
file: ./coverage.xml | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
tests/test_checker/test_noqa.py
Outdated
@@ -24,6 +24,9 @@ | |||
_PY38 = (3, 8) <= sys.version_info < (3, 9) | |||
_PY39 = (3, 9) <= sys.version_info < (3, 10) | |||
|
|||
# Versions for different platform-specific fixtures. | |||
_WIN = os.name == 'nt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
"""Checks if a file is executable.""" | ||
return os.access(filename, os.X_OK) | ||
|
||
|
||
def is_windows() -> bool: | ||
def is_windows() -> bool: # pragma: win |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function executes on both linux and win code, so no reason to ignore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -219,7 +222,7 @@ def _check_executable_mismatch( | |||
token: tokenize.TokenInfo, | |||
*, | |||
is_shebang: bool, | |||
) -> None: | |||
) -> None: # pragma: not-win |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move it to if is_windows() or self.filename == STDIN:
line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, we can not because testing shebang violations in this request was disabled.
def visit_comment( | ||
self, | ||
token: tokenize.TokenInfo, | ||
) -> None: # pragma: not-win |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
86e8454
to
b8eea45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! Only a single question left!
.github/workflows/test.yml
Outdated
- uses: crazy-max/ghaction-chocolatey@v1 | ||
- name: Install make | ||
with: | ||
args: install make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we merge curl
and make
together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
b8eea45
to
b8635fb
Compare
b8635fb
to
f066af8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YAML can be tricky! 😅
.github/workflows/test.yml
Outdated
- uses: crazy-max/ghaction-chocolatey@v1 | ||
- name: Install curl and make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: crazy-max/ghaction-chocolatey@v1 | |
- name: Install curl and make | |
- name: Install curl and make | |
uses: crazy-max/ghaction-chocolatey@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I heve not used gitlab ci actions before. Currently, I can not understand the source of the problem. I can try to investigate it later.
f066af8
to
c3f2276
Compare
Codecov Report
@@ Coverage Diff @@
## master #1899 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 115 116 +1
Lines 6145 6182 +37
Branches 1375 1375
=========================================
+ Hits 6145 6182 +37
Continue to review full report at Codecov.
|
@AlexandrKhabarov can you please help me with fixing the CI? I don't have any experience with windows, it just scares me too much 😨 |
I will try to solve it soon. |
0eee189
to
a2b8d41
Compare
I installed poetry and dependencies of the project, but now flake8 failed. |
This is related to https://gitlab.com/pycqa/flake8-docstrings Can you please report this issue to |
I have made things!
Checklist
CHANGELOG.md