-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
Fix Flake8 #428
Closed
Closed
Fix Flake8 #428
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9abe323
Format with Black
hugovk 2eaf8c5
Run Black on pre-commit and therefore tox and CI
hugovk 8c2364f
.tox is already a default. Don't overwrite other default excludes
hugovk fd1922f
Add Black-compatible config to Flake8
hugovk 77c5488
No __cmp__ or cmp in Python 3
hugovk 0987383
Fix Flake8
hugovk e3b445c
Fix undefined name
hugovk 6bab35b
Run Flake8 on pre-commit and therefore tox and CI
hugovk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Would be great to have a separate PR for this, with a test to complete coverage of that 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 could probably remove this whole
if
block. I don't see howcolumn_widths
can beNone
.The default value is
None
in the method definition:But it's only called from one place in
export_set
, and it includes a variable forcolumn_widths
, so it won't default toNone
:Earlier in that method, it is set as:
Which will always return a list:
A similar thing happens for the similar
if
block inexport_set_as_grid_table
.These are all in
_rst.py
, the underscore denoting a private, internal code, and not part of the API.What do you think?
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.
Not sure, as the method itself is not prefixed with underscore, so if someone could very well call something like
fmt = registry.get_format('rst'); fmt.export_set_as_simple_table(dataset)
without breaking private rules. No strong opinion, but I would tend to fix and test.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 we go! #433