-
Notifications
You must be signed in to change notification settings - Fork 34
chore: update pre-commit #199
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,6 @@ | |
| Not to be included with code distributions. | ||
| """ | ||
|
|
||
|
|
||
| import math | ||
| import re | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
|
|
||
| * No News Added: fix CI badge and target in README.rst | ||
|
|
||
|
|
||
| **Changed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| **Added:** | ||
|
|
||
| * No news needed: updating docformatter not user facing | ||
|
|
||
| **Changed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Deprecated:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Removed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Fixed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Security:** | ||
|
|
||
| * <news item> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,6 @@ | |
| * SymmetryError | ||
| """ | ||
|
|
||
|
|
||
| import os | ||
| import sys | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,7 +152,7 @@ class P_cif(StructureParser): | |
| del k | ||
|
|
||
| BtoU = 1.0 / (8 * numpy.pi**2) | ||
| """float: Conversion factor from B values to U values.""" | ||
| """Float: Conversion factor from B values to U values.""" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @danielsirakov @stevenhua0320 we don't want string literals floating around in the code, so whenever we find things like this we want to clean them up. The correct fix in general is to move them to the docstring at the top of the function and put them into a standard format. Here, this may just be a constant and this should be changed from a string to a comment and placed above line 154. |
||
|
|
||
| def _tr_ignore(a, value): | ||
| return | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -135,10 +135,10 @@ class P_pdb(StructureParser): | |
| "MASTER", | ||
| "END", | ||
| ] | ||
| """list: Ordered list of PDB record labels.""" | ||
| """List: Ordered list of PDB record labels.""" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. another floating string literal. It is documenting the static data list. Gemini suggested that even though it is not declared as self. it is still considered as a class attribute and so should be documented in the class docstring, something like: We can discuss this more, but in general I think taking this advice and using it also in other places in the PR is the right approach |
||
|
|
||
| validRecords = dict.fromkeys(orderOfRecords) | ||
| """dict: Dictionary of PDB record labels.""" | ||
| """Dict: Dictionary of PDB record labels.""" | ||
|
|
||
| def __init__(self): | ||
| StructureParser.__init__(self) | ||
|
|
||
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 code seems just to be setting defaults, so the default values just have to be moved up to the attribute description in the docstring above and deleted from here, something like that.