-
Notifications
You must be signed in to change notification settings - Fork 18
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
Develop #71
Conversation
…er as asked... 🙄)
…` along with `snb-plot` and `snb-analyse`. Also add test
…avoid memory overload and warning
…e to a `doped` change, fixed in the next released version
…fficiency (avoid regenerating each time, shaves ~30 minutes off testing times)
WalkthroughThis update weaves a tapestry of improvements throughout the project, enhancing functionality, maintainability, and user experience. From upgrading Python versions to refining workflows, handling errors gracefully, and enriching documentation and testing, these changes aim to elevate the project's quality and efficiency. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 5
Actionable comments outside the diff hunks (5)
shakenbreak/io.py (1)
Line range hint
22-23
: The importpymatgen.core.structure
is unused in this file. Removing unused imports can help reduce memory footprint and improve the clarity of the code.- from pymatgen.core.structure import Structure
tests/test_input.py (4)
Line range hint
4-4
: Remove unused importfilecmp
.- import filecmp
Line range hint
21-21
: Remove unused importSpecies
frompymatgen.core.periodic_table
.- from pymatgen.core.periodic_table import DummySpecies, Species + from pymatgen.core.periodic_table import DummySpecies
Line range hint
967-967
: The local variablevac_coords
is assigned but never used within the method. Consider removing it if it's not needed.- vac_coords = np.array([0, 0, 0]) # Cd vacancy fractional coordinates
Line range hint
2118-2118
: The local variablew
is assigned but never used within the method. Consider removing it if it's not needed.- with warnings.catch_warnings(record=True) as w: + with warnings.catch_warnings(record=True):
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.
Actionable comments posted: 28
tests/test_input.py
Outdated
@@ -1652,9 +1645,6 @@ def test_write_vasp_files(self): | |||
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) |
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.
Replace assertEqual
with assert
for consistency with Python best practices.
- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) | |
assert kpoints.kpts == [[1, 1, 1]] |
tests/test_input.py
Outdated
@@ -1692,13 +1682,12 @@ def test_write_vasp_files(self): | |||
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) |
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.
Replace assertEqual
with assert
for consistency with Python best practices.
- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) | |
assert kpoints.kpts == [[1, 1, 1]] |
tests/test_input.py
Outdated
@@ -2007,11 +1996,10 @@ def test_write_vasp_files(self): | |||
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) |
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.
Replace assertEqual
with assert
for consistency with Python best practices.
- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) | |
assert kpoints.kpts == [[1, 1, 1]] |
tests/test_input.py
Outdated
@@ -2222,9 +2210,6 @@ def test_write_vasp_files_from_doped_defect_gen(self): | |||
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) |
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.
Replace assertEqual
with assert
for consistency with Python best practices.
- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) | |
assert kpoints.kpts == [[1, 1, 1]] |
tests/test_input.py
Outdated
@@ -2259,13 +2244,12 @@ def test_write_vasp_files_from_doped_defect_gen(self): | |||
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) |
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.
Replace assertEqual
with assert
for consistency with Python best practices.
- self.assertEqual(kpoints.kpts, [[1, 1, 1]])
+ assert kpoints.kpts == [[1, 1, 1]]
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) | |
assert kpoints.kpts == [[1, 1, 1]] |
…mes for High Energy distortions (these are not parsed so no need to format them)
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.
Actionable comments posted: 27
Out of diff range and nitpick comments (35)
shakenbreak/SnB_run.sh (8)
Line range hint
68-68
: Usefind
instead ofls
to better handle non-alphanumeric filenames.- num_outcars=$(ls OUTCAR* | wc -l) + num_outcars=$(find . -maxdepth 1 -name 'OUTCAR*' | wc -l)
Line range hint
145-145
: Use{ ..; }
instead of(..)
to avoid subshell overhead.- if check_multiple_single_step_outcars && { ( [[ -f "CONTCAR" ]] && [[ $(wc -l < "CONTCAR") -le 9 ]] ) || ( [[ -f "CONTCAR" ]] && diff -q "POSCAR" "CONTCAR" >/dev/null ) || [[ ! -f "CONTCAR" ]]; }; then + if check_multiple_single_step_outcars && { [[ -f "CONTCAR" ]] && [[ $(wc -l < "CONTCAR") -le 9 ]] || [[ -f "CONTCAR" ]] && diff -q "POSCAR" "CONTCAR" >/dev/null || [[ ! -f "CONTCAR" ]]; }; then
Line range hint
155-155
: Consider usinggrep -c
instead ofgrep|wc -l
.- num_ionic_steps=$(grep entropy= OUTCAR* | wc -l) + num_ionic_steps=$(grep -c 'entropy=' OUTCAR*)
Line range hint
195-195
: Double quote to prevent globbing and word splitting.- cp ${vasp_file} ${vasp_file}_${current_time} + cp "${vasp_file}" "${vasp_file}_${current_time}"
Line range hint
197-197
: Double quote to prevent globbing and word splitting.- "cp" CONTCAR POSCAR + "cp" "CONTCAR" "POSCAR"
Line range hint
218-218
: Use./*glob*
or-- *glob*
so names with dashes won't become options.- rm "${i}"/DOSCAR + rm -- "${i}"/DOSCAR
Line range hint
222-222
: Use./*glob*
or-- *glob*
so names with dashes won't become options.- rm *_"${current_time}" + rm -- *_"${current_time}"
Line range hint
252-252
: Double quote to prevent globbing and word splitting.- rm "${i}"/DOSCAR + rm -- "${i}"/DOSCARREADME.md (14)
Line range hint
10-10
: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.- defect structure-searching method employing chemically-guided bond distortions to locate ground-state + defect structure searching method employing chemically guided bond distortions to locate ground-state
Line range hint
11-11
: Unpaired symbol: ‘]’ seems to be missing.- locate ground-state and metastable structures of point defects in solid materials. [Docs here!](https://shakenbreak.readthedocs.io/en/latest/) + locate ground-state and metastable structures of point defects in solid materials. [Docs here!](https://shakenbreak.readthedocs.io/en/latest/)]
Line range hint
38-38
: Consider adding a comma here.- Alternatively if needed, it can also be installed from `conda` with: + Alternatively, if needed, it can also be installed from `conda` with:
Line range hint
109-109
: Consider an alternative verb to strengthen your wording.- Please let us know if you have any issues with compatibility, or if you would like to see any additional features added to `ShakeNBreak` to make it more compatible with your code. + Please inform us if you encounter any compatibility issues, or if you would like to see any additional features added to `ShakeNBreak` to enhance its compatibility with your code.
Line range hint
113-113
: Consider adding a comma here.- Bugs reports, feature requests and questions + Bugs, reports, feature requests, and questions
Line range hint
174-174
: Did you mean “are” or “were”?- `ShakeNBreak` is compatible with Python 3.9 - 3.12 and requires the following open-source python packages: + `ShakeNBreak` is compatible with Python 3.9 - 3.12 and requires the following open-source Python packages:
Line range hint
174-174
: If you want to indicate numerical ranges or time ranges, consider using an en dash.- `ShakeNBreak` is compatible with Python 3.9 - 3.12 and requires the following open-source python packages: + `ShakeNBreak` is compatible with Python 3.9–3.12 and requires the following open-source Python packages:
Line range hint
27-27
: Heading levels should only increment by one level at a time.- ### Literature + ## Literature
Line range hint
28-28
: Unordered list style.- - Preview: Mosquera-Lois, I.; Kavanagh, S. R. [In Search of Hidden Defects](https://doi.org/10.1016/j.matt.2021.06.003), _Matter_ 4 (8), 2602-2605, **2021** + * Preview: Mosquera-Lois, I.; Kavanagh, S. R. [In Search of Hidden Defects](https://doi.org/10.1016/j.matt.2021.06.003), _Matter_ 4 (8), 2602-2605, **2021**
Line range hint
71-71
: Multiple consecutive blank lines.- +
Line range hint
9-9
: Headings should be surrounded by blank lines.- # `ShakeNBreak` (`SnB`) + # `ShakeNBreak` (`SnB`)
Line range hint
35-35
: Fenced code blocks should be surrounded by blank lines.- ```bash + ```bash
Line range hint
14-14
: Lists should be surrounded by blank lines.- Main features include: + Main features include:
Line range hint
10-10
: Images should have alternate text (alt text).- <a href="https://shakenbreak.readthedocs.io/en/latest/"><img align="right" width="400" src="https://raw.githubusercontent.com/SMTG-Bham/ShakeNBreak/main/docs/toc.png"></a> + <a href="https://shakenbreak.readthedocs.io/en/latest/"><img align="right" width="400" src="https://raw.githubusercontent.com/SMTG-Bham/ShakeNBreak/main/docs/toc.png" alt="ShakeNBreak Table of Contents"></a>docs/index.rst (1)
214-218
: Ensure the new study entries follow the same format as the existing ones for consistency.The new study entries look good, but please ensure they follow the same format as the existing ones for consistency. For example, ensure proper use of italics, bold, and subscript where applicable.
tests/test_input.py (11)
Line range hint
480-484
: Use a regularassert
instead ofunittest
-styleassertEqual
for a more Pythonic approach.- self.assertEqual(V_Cd_comp, Composition("Cd32Te32")) + assert V_Cd_comp == Composition("Cd32Te32")
Line range hint
554-554
: Use a regularassert
instead ofunittest
-styleassertEqual
for a more Pythonic approach.- self.assertEqual(intput_frac_coords.tolist(), output_frac_coords.tolist()) + assert intput_frac_coords.tolist() == output_frac_coords.tolist()
Line range hint
573-573
: The first line of the docstring should end with a period.- """Test _calc_number_electrons function""" + """Test _calc_number_electrons function."""
Line range hint
617-617
: Use a regularassert
instead ofunittest
-styleassertNotEqual
for a more Pythonic approach.- self.assertNotEqual(V_Cd_distorted_dict["distorted_structure"], self.V_Cd_minus0pt5_struc_rattled) + assert V_Cd_distorted_dict["distorted_structure"] != self.V_Cd_minus0pt5_struc_rattled
Line range hint
675-675
: Use a regularassert
instead ofunittest
-styleassertEqual
for a more Pythonic approach.- self.assertEqual(Int_Cd_2_distorted_dict["distorted_structure"], self.Int_Cd_2_minus0pt6_struc_rattled) + assert Int_Cd_2_distorted_dict["distorted_structure"] == self.Int_Cd_2_minus0pt6_struc_rattled
Line range hint
757-757
: Use a regularassert
instead ofunittest
-styleassertEqual
for a more Pythonic approach.- self.assertEqual(Int_Cd_2_distorted_dict["distorted_structure"], self.Int_Cd_2_minus0pt6_NN_10_struc_unrattled) + assert Int_Cd_2_distorted_dict["distorted_structure"] == self.Int_Cd_2_minus0pt6_NN_10_struc_unrattled
Line range hint
884-884
: Use a regularassert
instead ofunittest
-styleassertIn
for a more Pythonic approach.- self.assertIn("Bond_Distortion_-60.0%", V_Cd_distorted_dict["distortions"]) + assert "Bond_Distortion_-60.0%" in V_Cd_distorted_dict["distortions"]
Line range hint
2558-2558
: Use a regularassert
instead ofunittest
-styleassertDictEqual
for a more Pythonic approach.- self.assertDictEqual(output[1]['defects']['v_Cd_C1_Se2.68']["charges"][0]['distorted_atoms'], [[58, 'Se'], [34, 'Te']]) + assert output[1]['defects']['v_Cd_C1_Se2.68']["charges"][0]['distorted_atoms'] == [[58, 'Se'], [34, 'Te']]
Line range hint
3734-3734
: Use a regularassert
instead ofunittest
-styleassertEqual
for a more Pythonic approach.- self.assertEqual(dist.defects_dict["Cd_i_C3v_Cd2.71"][0].defect.defect_site_index, 0) + assert dist.defects_dict["Cd_i_C3v_Cd2.71"][0].defect.defect_site_index == 0
Line range hint
2824-2824
: Use a regularassert
instead ofunittest
-styleassertTrue
for a more Pythonic approach.- self.assertTrue(os.path.exists("vac_1_Cd_0/Unperturbed")) + assert os.path.exists("vac_1_Cd_0/Unperturbed")
Line range hint
2908-2908
: Use a regularassert
instead ofunittest
-styleassertEqual
for a more Pythonic approach.- self.assertEqual(test_input, generated_input) + assert test_input == generated_inputtests/test_cli.py (1)
Line range hint
3232-3246
: Simplify the list comprehension.- assert all( - f"unreasonable charge state). If both checks pass, you likely need to adjust " - f"the `stdev` rattling parameter (can occur for hard/ionic/magnetic " - f"materials); see " - f"https://shakenbreak.readthedocs.io/en/latest/Tips.html#hard-ionic-materials\n" - f"This often indicates a complex PES with multiple minima, " - f"thus energy-lowering distortions particularly likely, so important to " - f"test with reduced `stdev`!" == str(i.message) - for i in w - ) + for i in w: + assert ( + f"unreasonable charge state). If both checks pass, you likely need to adjust " + f"the `stdev` rattling parameter (can occur for hard/ionic/magnetic " + f"materials); see " + f"https://shakenbreak.readthedocs.io/en/latest/Tips.html#hard-ionic-materials\n" + f"This often indicates a complex PES with multiple minima, " + f"thus energy-lowering distortions particularly likely, so important to " + f"test with reduced `stdev`!" == str(i.message) + )
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (11)
- README.md (1 hunks)
- docs/index.rst (1 hunks)
- shakenbreak/SnB_run.sh (1 hunks)
- shakenbreak/cli.py (32 hunks)
- shakenbreak/distortions.py (16 hunks)
- shakenbreak/energy_lowering_distortions.py (27 hunks)
- shakenbreak/input.py (69 hunks)
- tests/data/cp2k/vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input.inp (1 hunks)
- tests/data/cp2k/vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input_user_parameters.inp (1 hunks)
- tests/test_cli.py (16 hunks)
- tests/test_input.py (27 hunks)
Files not summarized due to errors (1)
- shakenbreak/input.py: Error: Message exceeds token limit
Files skipped from review due to trivial changes (1)
- shakenbreak/distortions.py
Additional Context Used
LanguageTool (11)
README.md (11)
Near line 10: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ct structure-searching method employing chemically-guided bond distortions to locate ground-state...
Near line 11: Unpaired symbol: ‘]’ seems to be missing
Context: ...es of point defects in solid materials. [Docs here!](https://shakenbreak.readthed...
Near line 28: ‘In Search of’ might be wordy. Consider a shorter alternative.
Context: ...ew: Mosquera-Lois, I.; Kavanagh, S. R. [In Search of Hidden Defects](https://doi.org/10.1016...
Near line 29: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...i.org/10.21105/joss.04817), Journal of Open Source Software 7 (80), 4817, 2022 - Theo...
Near line 38: Possible missing comma found.
Context: ...bash pip install shakenbreak
Alternatively if needed, it can also be installed fro...
Near line 109: Consider an alternative verb to strengthen your wording.
Context: ... these files. Please let us know if you have any issues with compatibility, or if yo...
Near line 113: Consider adding a comma here.
Context: ... reports, feature requests and questions Please use the [Issue Tracker](https://github....
Near line 165: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...i.org/10.21105/joss.04817). Journal of Open Source Software 7 (80), 4817, 2022 - Theo...
Near line 169: ‘In Search of’ might be wordy. Consider a shorter alternative.
Context: ...: - Mosquera-Lois, I.; Kavanagh, S. R. [In Search of Hidden Defects](https://doi.org/10.1016...
Near line 174: Did you mean “are” or “were”?
Context: ...d) file. ## RequirementsShakeNBreak
is compatible with Python 3.9 - 3.12 and r...
Near line 174: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...akeNBreak` is compatible with Python 3.9 - 3.12 and requires the following open-sou...
ShellCheck (10)
shakenbreak/SnB_run.sh (10)
[info] 68-68: Use find instead of ls to better handle non-alphanumeric filenames.
[style] 145-145: Use { ..; } instead of (..) to avoid subshell overhead.
[style] 155-155: Consider using 'grep -c' instead of 'grep|wc -l'.
[info] 195-195: Double quote to prevent globbing and word splitting.
[info] 195-195: Double quote to prevent globbing and word splitting.
[info] 195-195: Double quote to prevent globbing and word splitting.
[info] 197-197: Double quote to prevent globbing and word splitting.
[info] 218-218: Use ./glob or -- glob so names with dashes won't become options.
[info] 222-222: Use ./glob or -- glob so names with dashes won't become options.
[info] 252-252: Double quote to prevent globbing and word splitting.
Ruff (1109)
tests/test_cli.py (696)
1-1: Missing docstring in public module
1-29: Import block is un-sorted or un-formatted
45-45: Missing docstring in public function
54-54: First line should end with a period, question mark, or exclamation point
156-156: Call
endswith
once with atuple
228-231: First line should end with a period, question mark, or exclamation point
242-245: First line should end with a period, question mark, or exclamation point
268-268: Use a regular
assert
instead of unittest-styleassertEqual
269-269: Use a regular
assert
instead of unittest-styleassertIn
274-274: Use a regular
assert
instead of unittest-styleassertIn
280-280: Use a regular
assert
instead of unittest-styleassertIn
287-287: Use a regular
assert
instead of unittest-styleassertIn
288-288: Use a regular
assert
instead of unittest-styleassertIn
289-289: Use a regular
assert
instead of unittest-styleassertIn
293-293: Use a regular
assert
instead of unittest-styleassertIn
294-294: Use a regular
assert
instead of unittest-styleassertIn
295-296: Explicitly concatenated string should be implicitly concatenated
300-300: Use a regular
assert
instead of unittest-styleassertIn
301-301: Use a regular
assert
instead of unittest-styleassertIn
302-303: Explicitly concatenated string should be implicitly concatenated
310-310: Use a regular
assert
instead of unittest-styleassertTrue
314-314: Use a regular
assert
instead of unittest-styleassertEqual
318-318: Use a regular
assert
instead of unittest-styleassertEqual
324-324: Use a regular
assert
instead of unittest-styleassertEqual
352-352: Use a regular
assert
instead of unittest-styleassertEqual
353-353: Use a regular
assert
instead of unittest-styleassertNotIn
359-359: Use a regular
assert
instead of unittest-styleassertIn
365-365: Use a regular
assert
instead of unittest-styleassertIn
371-371: Use a regular
assert
instead of unittest-styleassertIn
372-372: Use a regular
assert
instead of unittest-styleassertIn
373-373: Use a regular
assert
instead of unittest-styleassertIn
377-377: Use a regular
assert
instead of unittest-styleassertNotIn
378-378: Use a regular
assert
instead of unittest-styleassertNotIn
379-380: Explicitly concatenated string should be implicitly concatenated
387-387: Use a regular
assert
instead of unittest-styleassertIn
394-394: Use a regular
assert
instead of unittest-styleassertIn
397-397: Use a regular
assert
instead of unittest-styleassertTrue
398-398: Use a regular
assert
instead of unittest-styleassertTrue
404-404: Use a regular
assert
instead of unittest-styleassertIn
411-411: Use a regular
assert
instead of unittest-styleassertTrue
420-420: Prefer
next(...)
over single element slice
422-422: Use a regular
assert
instead of unittest-styleassertDictEqual
451-451: Use a regular
assert
instead of unittest-styleassertEqual
452-452: Use a regular
assert
instead of unittest-styleassertIn
453-453: Use a regular
assert
instead of unittest-styleassertIn
454-454: Use a regular
assert
instead of unittest-styleassertIn
458-458: Use a regular
assert
instead of unittest-styleassertNotIn
462-462: Use a regular
assert
instead of unittest-styleassertNotIn
465-465: Use a regular
assert
instead of unittest-styleassertEqual
466-466: Use a regular
assert
instead of unittest-styleassertEqual
469-469: Use a regular
assert
instead of unittest-styleassertEqual
480-480: Use a regular
assert
instead of unittest-styleassertDictEqual
506-506: Use a regular
assert
instead of unittest-styleassertEqual
507-507: Use a regular
assert
instead of unittest-styleassertIn
508-508: Use a regular
assert
instead of unittest-styleassertIn
509-509: Use a regular
assert
instead of unittest-styleassertIn
513-513: Use a regular
assert
instead of unittest-styleassertNotIn
517-517: Use a regular
assert
instead of unittest-styleassertNotIn
520-520: Use a regular
assert
instead of unittest-styleassertEqual
521-521: Use a regular
assert
instead of unittest-styleassertEqual
525-525: Use a regular
assert
instead of unittest-styleassertEqual
536-536: Use a regular
assert
instead of unittest-styleassertNotEqual
539-539: Use a regular
assert
instead of unittest-styleassertDictEqual
570-570: Use a regular
assert
instead of unittest-styleassertEqual
571-571: Use a regular
assert
instead of unittest-styleassertIn
572-572: Use a regular
assert
instead of unittest-styleassertIn
573-573: Use a regular
assert
instead of unittest-styleassertNotIn
577-577: Use a regular
assert
instead of unittest-styleassertNotIn
581-581: Use a regular
assert
instead of unittest-styleassertNotIn
584-584: Use a regular
assert
instead of unittest-styleassertEqual
585-585: Use a regular
assert
instead of unittest-styleassertEqual
588-588: Use a regular
assert
instead of unittest-styleassertEqual
599-599: Use a regular
assert
instead of unittest-styleassertNotEqual
630-630: Use a regular
assert
instead of unittest-styleassertEqual
631-631: Use a regular
assert
instead of unittest-styleassertIn
632-632: Use a regular
assert
instead of unittest-styleassertIn
633-633: Use a regular
assert
instead of unittest-styleassertNotIn
637-637: Use a regular
assert
instead of unittest-styleassertIn
641-641: Use a regular
assert
instead of unittest-styleassertIn
644-644: Use a regular
assert
instead of unittest-styleassertEqual
645-645: Use a regular
assert
instead of unittest-styleassertEqual
648-648: Use a regular
assert
instead of unittest-styleassertEqual
659-659: Use a regular
assert
instead of unittest-styleassertNotEqual
680-680: Use a regular
assert
instead of unittest-styleassertEqual
681-681: Use a regular
assert
instead of unittest-styleassertNotIn
682-682: Use a regular
assert
instead of unittest-styleassertIn
683-683: Use a regular
assert
instead of unittest-styleassertIn
684-684: Use a regular
assert
instead of unittest-styleassertIn
685-685: Use a regular
assert
instead of unittest-styleassertIn
686-686: Use a regular
assert
instead of unittest-styleassertIn
750-750: Unnecessary open mode parameters
776-776: Use a regular
assert
instead of unittest-styleassertEqual
785-785: Use a regular
assert
instead of unittest-styleassertTrue
786-786: Use a regular
assert
instead of unittest-styleassertTrue
787-787: Use a regular
assert
instead of unittest-styleassertIn
789-789: Use a regular
assert
instead of unittest-styleassertIn
790-791: Explicitly concatenated string should be implicitly concatenated
796-796: Use a regular
assert
instead of unittest-styleassertEqual
821-821: Use a regular
assert
instead of unittest-styleassertEqual
824-824: Use a regular
assert
instead of unittest-styleassertFalse
827-827: Use a regular
assert
instead of unittest-styleassertFalse
831-831: Use a regular
assert
instead of unittest-styleassertNotIn
832-832: Use a regular
assert
instead of unittest-styleassertIn
833-833: Use a regular
assert
instead of unittest-styleassertIn
834-835: Explicitly concatenated string should be implicitly concatenated
839-839: Use a regular
assert
instead of unittest-styleassertEqual
870-870: Use a regular
assert
instead of unittest-styleassertEqual
877-877: Use a regular
assert
instead of unittest-styleassertFalse
881-881: Use a regular
assert
instead of unittest-styleassertNotIn
882-882: Use a regular
assert
instead of unittest-styleassertIn
884-884: Use a regular
assert
instead of unittest-styleassertIn
885-886: Explicitly concatenated string should be implicitly concatenated
916-916: Use a regular
assert
instead of unittest-styleassertEqual
919-919: Use a regular
assert
instead of unittest-styleassertNotIn
920-920: Use a regular
assert
instead of unittest-styleassertIn
921-921: Use a regular
assert
instead of unittest-styleassertIn
922-922: f-string without any placeholders
922-923: Explicitly concatenated string should be implicitly concatenated
927-927: Use a regular
assert
instead of unittest-styleassertNotIn
951-951: Use a regular
assert
instead of unittest-styleassertEqual
954-954: Use a regular
assert
instead of unittest-styleassertNotIn
955-955: Use a regular
assert
instead of unittest-styleassertIn
956-956: Use a regular
assert
instead of unittest-styleassertIn
957-958: Explicitly concatenated string should be implicitly concatenated
962-962: Use a regular
assert
instead of unittest-styleassertNotIn
1025-1025: Unnecessary open mode parameters
1043-1043: Use a regular
assert
instead of unittest-styleassertEqual
1044-1044: Use a regular
assert
instead of unittest-styleassertIn
1050-1050: Use a regular
assert
instead of unittest-styleassertIn
1056-1056: Use a regular
assert
instead of unittest-styleassertIn
1063-1063: Use a regular
assert
instead of unittest-styleassertIn
1064-1064: Use a regular
assert
instead of unittest-styleassertIn
1065-1065: Use a regular
assert
instead of unittest-styleassertIn
1069-1069: Use a regular
assert
instead of unittest-styleassertIn
1070-1070: Use a regular
assert
instead of unittest-styleassertIn
1071-1073: Explicitly concatenated string should be implicitly concatenated
1099-1099: Use a regular
assert
instead of unittest-styleassertIn
1100-1100: Use a regular
assert
instead of unittest-styleassertIn
1101-1101: Use a regular
assert
instead of unittest-styleassertIn
1105-1105: Use a regular
assert
instead of unittest-styleassertIn
1109-1109: Use a regular
assert
instead of unittest-styleassertNotIn
1110-1110: Use a regular
assert
instead of unittest-styleassertNotIn
1113-1113: Use a regular
assert
instead of unittest-styleassertTrue
1114-1114: Use a regular
assert
instead of unittest-styleassertFalse
1115-1115: Use a regular
assert
instead of unittest-styleassertFalse
1132-1132: Use a regular
assert
instead of unittest-styleassertIn
1137-1137: Use a regular
assert
instead of unittest-styleassertIn
1141-1141: Use a regular
assert
instead of unittest-styleassertNotIn
1142-1142: Use a regular
assert
instead of unittest-styleassertNotIn
1145-1145: Use a regular
assert
instead of unittest-styleassertTrue
1146-1146: Use a regular
assert
instead of unittest-styleassertFalse
1147-1147: Use a regular
assert
instead of unittest-styleassertFalse
1185-1185: Use a regular
assert
instead of unittest-styleassertEqual
1189-1189: Use a regular
assert
instead of unittest-styleassertEqual
1193-1193: Use a regular
assert
instead of unittest-styleassertEqual
1224-1224: Use a regular
assert
instead of unittest-styleassertEqual
1225-1225: Use a regular
assert
instead of unittest-styleassertNotIn
1226-1226: Use a regular
assert
instead of unittest-styleassertNotIn
1227-1227: Use a regular
assert
instead of unittest-styleassertIn
1234-1234: Use a regular
assert
instead of unittest-styleassertIn
1235-1235: Use a regular
assert
instead of unittest-styleassertIn
1236-1236: Use a regular
assert
instead of unittest-styleassertIn
1243-1243: Use a regular
assert
instead of unittest-styleassertNotEqual
1277-1277: Use a regular
assert
instead of unittest-styleassertEqual
1278-1278: Use a regular
assert
instead of unittest-styleassertNotIn
1279-1279: Use a regular
assert
instead of unittest-styleassertIn
1280-1280: Use a regular
assert
instead of unittest-styleassertIn
1285-1285: Use a regular
assert
instead of unittest-styleassertIn
1286-1286: Use a regular
assert
instead of unittest-styleassertIn
1287-1287: Use a regular
assert
instead of unittest-styleassertIn
1336-1336: Unnecessary open mode parameters
1365-1365: Use a regular
assert
instead of unittest-styleassertEqual
1366-1366: Use a regular
assert
instead of unittest-styleassertNotIn
1367-1367: Use a regular
assert
instead of unittest-styleassertIn
1368-1368: Use a regular
assert
instead of unittest-styleassertIn
1373-1373: Use a regular
assert
instead of unittest-styleassertIn
1374-1374: Use a regular
assert
instead of unittest-styleassertIn
1375-1375: Use a regular
assert
instead of unittest-styleassertIn
1381-1381: Use a regular
assert
instead of unittest-styleassertTrue
1382-1382: Use a regular
assert
instead of unittest-styleassertTrue
1386-1386: Use a regular
assert
instead of unittest-styleassertEqual
1390-1390: Use a regular
assert
instead of unittest-styleassertEqual
1417-1417: Use a regular
assert
instead of unittest-styleassertEqual
1418-1418: Use a regular
assert
instead of unittest-styleassertIn
1422-1422: Use a regular
assert
instead of unittest-styleassertIn
1426-1426: Use a regular
assert
instead of unittest-styleassertIn
1430-1430: Use a regular
assert
instead of unittest-styleassertNotIn
1431-1431: Use a regular
assert
instead of unittest-styleassertNotIn
1432-1432: Use a regular
assert
instead of unittest-styleassertTrue
1433-1433: Use a regular
assert
instead of unittest-styleassertTrue
1434-1434: Use a regular
assert
instead of unittest-styleassertTrue
1435-1435: Use a regular
assert
instead of unittest-styleassertTrue
1436-1436: Use a regular
assert
instead of unittest-styleassertTrue
1437-1437: Use a regular
assert
instead of unittest-styleassertFalse
1465-1465: Use a regular
assert
instead of unittest-styleassertEqual
1466-1466: Use a regular
assert
instead of unittest-styleassertIn
1467-1467: Use a regular
assert
instead of unittest-styleassertNotIn
1477-1477: Use a regular
assert
instead of unittest-styleassertEqual
1481-1481: Use a regular
assert
instead of unittest-styleassertEqual
1485-1485: Use a regular
assert
instead of unittest-styleassertEqual
1517-1517: Use a regular
assert
instead of unittest-styleassertEqual
1518-1518: Use a regular
assert
instead of unittest-styleassertIn
1519-1519: Use a regular
assert
instead of unittest-styleassertNotIn
1520-1520: Use a regular
assert
instead of unittest-styleassertEqual
1521-1521: Use a regular
assert
instead of unittest-styleassertEqual
1568-1568: Use a regular
assert
instead of unittest-styleassertEqual
1569-1569: Use a regular
assert
instead of unittest-styleassertIn
1570-1570: Use a regular
assert
instead of unittest-styleassertIn
1571-1571: Use a regular
assert
instead of unittest-styleassertIn
1576-1576: Use a regular
assert
instead of unittest-styleassertIn
1577-1577: Use a regular
assert
instead of unittest-styleassertIn
1579-1579: Use a regular
assert
instead of unittest-styleassertIn
1583-1583: Use a regular
assert
instead of unittest-styleassertIn
1587-1587: Use a regular
assert
instead of unittest-styleassertIn
1588-1588: Use a regular
assert
instead of unittest-styleassertIn
1589-1590: Explicitly concatenated string should be implicitly concatenated
1594-1594: Use a regular
assert
instead of unittest-styleassertIn
1598-1598: Use a regular
assert
instead of unittest-styleassertIn
1599-1599: Use a regular
assert
instead of unittest-styleassertIn
1600-1601: Explicitly concatenated string should be implicitly concatenated
1605-1605: Use a regular
assert
instead of unittest-styleassertIn
1609-1609: Use a regular
assert
instead of unittest-styleassertIn
1610-1610: Use a regular
assert
instead of unittest-styleassertIn
1611-1612: Explicitly concatenated string should be implicitly concatenated
1612-1612: Line too long (114 > 107)
1613-1613: Line too long (117 > 107)
1616-1616: Use a regular
assert
instead of unittest-styleassertNotIn
1619-1621: Consider
[1, *list(range(-1, 2))]
instead of concatenation
1623-1623: Use a regular
assert
instead of unittest-styleassertTrue
1630-1630: Use a regular
assert
instead of unittest-styleassertTrue
1632-1632: Use a regular
assert
instead of unittest-styleassertEqual
1637-1637: Use a regular
assert
instead of unittest-styleassertEqual
1695-1695: Use a regular
assert
instead of unittest-styleassertEqual
1696-1696: Use a regular
assert
instead of unittest-styleassertIn
1697-1697: Use a regular
assert
instead of unittest-styleassertIn
1700-1700: Use a regular
assert
instead of unittest-styleassertNotIn
1704-1704: Use a regular
assert
instead of unittest-styleassertIn
1708-1708: Use a regular
assert
instead of unittest-styleassertIn
1709-1709: Use a regular
assert
instead of unittest-styleassertIn
1710-1711: Explicitly concatenated string should be implicitly concatenated
1716-1716: Use a regular
assert
instead of unittest-styleassertTrue
1717-1717: Use a regular
assert
instead of unittest-styleassertFalse
1719-1719: Use a regular
assert
instead of unittest-styleassertEqual
1763-1763: Use a regular
assert
instead of unittest-styleassertEqual
1764-1764: Use a regular
assert
instead of unittest-styleassertIn
1765-1765: Use a regular
assert
instead of unittest-styleassertIn
1768-1768: Use a regular
assert
instead of unittest-styleassertNotIn
1772-1772: Use a regular
assert
instead of unittest-styleassertIn
1776-1776: Use a regular
assert
instead of unittest-styleassertIn
1777-1777: Use a regular
assert
instead of unittest-styleassertIn
1778-1779: Explicitly concatenated string should be implicitly concatenated
1784-1784: Use a regular
assert
instead of unittest-styleassertTrue
1785-1785: Use a regular
assert
instead of unittest-styleassertFalse
1787-1787: Use a regular
assert
instead of unittest-styleassertEqual
1831-1831: Use a regular
assert
instead of unittest-styleassertEqual
1832-1832: Use a regular
assert
instead of unittest-styleassertIn
1833-1833: Use a regular
assert
instead of unittest-styleassertIn
1834-1834: Use a regular
assert
instead of unittest-styleassertEqual
1835-1835: Use a regular
assert
instead of unittest-styleassertEqual
1840-1840: Use a regular
assert
instead of unittest-styleassertIn
1846-1846: Use a regular
assert
instead of unittest-styleassertIn
1850-1850: Use a regular
assert
instead of unittest-styleassertIn
1851-1851: Use a regular
assert
instead of unittest-styleassertIn
1852-1853: Explicitly concatenated string should be implicitly concatenated
1858-1858: Use a regular
assert
instead of unittest-styleassertTrue
1870-1876: f-string without any placeholders
1895-1895: Use a regular
assert
instead of unittest-styleassertEqual
1896-1896: Use a regular
assert
instead of unittest-styleassertIn
1897-1897: Use a regular
assert
instead of unittest-styleassertIn
1898-1898: Use a regular
assert
instead of unittest-styleassertEqual
1899-1899: Use a regular
assert
instead of unittest-styleassertEqual
1904-1904: Use a regular
assert
instead of unittest-styleassertIn
1909-1909: Use a regular
assert
instead of unittest-styleassertIn
1910-1910: f-string without any placeholders
1914-1914: Use a regular
assert
instead of unittest-styleassertIn
1915-1915: f-string without any placeholders
1918-1918: Use a regular
assert
instead of unittest-styleassertIn
1919-1919: Use a regular
assert
instead of unittest-styleassertIn
1920-1921: Explicitly concatenated string should be implicitly concatenated
1926-1926: Use a regular
assert
instead of unittest-styleassertTrue
1927-1927: Use a regular
assert
instead of unittest-styleassertTrue
1951-1951: Use a regular
assert
instead of unittest-styleassertIn
1957-1957: Use a regular
assert
instead of unittest-styleassertIn
1961-1961: Use a regular
assert
instead of unittest-styleassertNotIn
1962-1962: Use a regular
assert
instead of unittest-styleassertNotIn
1965-1965: Use a regular
assert
instead of unittest-styleassertTrue
1966-1966: Use a regular
assert
instead of unittest-styleassertFalse
1967-1967: Use a regular
assert
instead of unittest-styleassertFalse
1970-1970: First line should end with a period, question mark, or exclamation point
1977-1977: Use a regular
assert
instead of unittest-styleassertIn
1982-1982: Use a regular
assert
instead of unittest-styleassertIn
1983-1983: Use a regular
assert
instead of unittest-styleassertIn
1984-1984: Use a regular
assert
instead of unittest-styleassertNotIn
1996-1996: Use a regular
assert
instead of unittest-styleassertNotIn
2001-2001: Use a regular
assert
instead of unittest-styleassertIn
2002-2002: Use a regular
assert
instead of unittest-styleassertIn
2003-2003: Use a regular
assert
instead of unittest-styleassertNotIn
2006-2006: Use a regular
assert
instead of unittest-styleassertIn
2007-2007: Use a regular
assert
instead of unittest-styleassertIn
2008-2008: Use a regular
assert
instead of unittest-styleassertTrue
2022-2022: Use a regular
assert
instead of unittest-styleassertNotIn
2027-2027: Use a regular
assert
instead of unittest-styleassertIn
2028-2028: Use a regular
assert
instead of unittest-styleassertIn
2029-2029: Use a regular
assert
instead of unittest-styleassertNotIn
2032-2032: Use a regular
assert
instead of unittest-styleassertIn
2033-2033: Use a regular
assert
instead of unittest-styleassertIn
2034-2034: Use a regular
assert
instead of unittest-styleassertTrue
2054-2054: Use a regular
assert
instead of unittest-styleassertIn
2062-2062: Use a regular
assert
instead of unittest-styleassertEqual
2073-2073: Use a regular
assert
instead of unittest-styleassertIn
2081-2081: Use a regular
assert
instead of unittest-styleassertEqual
2092-2092: Use a regular
assert
instead of unittest-styleassertIn
2100-2100: Use a regular
assert
instead of unittest-styleassertEqual
2101-2101: Use a regular
assert
instead of unittest-styleassertEqual
2102-2102: Use a regular
assert
instead of unittest-styleassertEqual
2103-2103: Use a regular
assert
instead of unittest-styleassertEqual
2122-2122: Use a regular
assert
instead of unittest-styleassertIn
2123-2123: Use a regular
assert
instead of unittest-styleassertIn
2126-2126: Use a regular
assert
instead of unittest-styleassertIn
2127-2127: Use a regular
assert
instead of unittest-styleassertIn
2128-2128: Use a regular
assert
instead of unittest-styleassertIn
2131-2131: Use a regular
assert
instead of unittest-styleassertIn
2134-2134: Use a regular
assert
instead of unittest-styleassertIn
2137-2137: Use a regular
assert
instead of unittest-styleassertFalse
2140-2140: Use a regular
assert
instead of unittest-styleassertTrue
2141-2141: Use a regular
assert
instead of unittest-styleassertFalse
2177-2177: Use a regular
assert
instead of unittest-styleassertIn
2183-2183: Use a regular
assert
instead of unittest-styleassertIn
2214-2214: Use a regular
assert
instead of unittest-styleassertIn
2215-2215: Use a regular
assert
instead of unittest-styleassertIn
2216-2216: Use a regular
assert
instead of unittest-styleassertNotIn
2217-2217: Use a regular
assert
instead of unittest-styleassertNotIn
2218-2218: Use a regular
assert
instead of unittest-styleassertNotIn
2219-2219: Use a regular
assert
instead of unittest-styleassertIn
2224-2224: Use a regular
assert
instead of unittest-styleassertFalse
2225-2225: Use a regular
assert
instead of unittest-styleassertTrue
2236-2236: Use a regular
assert
instead of unittest-styleassertIn
2237-2237: Use a regular
assert
instead of unittest-styleassertIn
2238-2238: Use a regular
assert
instead of unittest-styleassertNotIn
2239-2239: Use a regular
assert
instead of unittest-styleassertNotIn
2240-2240: Use a regular
assert
instead of unittest-styleassertNotIn
2241-2241: Use a regular
assert
instead of unittest-styleassertNotIn
2246-2246: Use a regular
assert
instead of unittest-styleassertFalse
2247-2247: Use a regular
assert
instead of unittest-styleassertFalse
2248-2248: Use a regular
assert
instead of unittest-styleassertTrue
2277-2277: Use a regular
assert
instead of unittest-styleassertIn
2278-2278: Use a regular
assert
instead of unittest-styleassertIn
2279-2279: Use a regular
assert
instead of unittest-styleassertNotIn
2280-2280: Use a regular
assert
instead of unittest-styleassertIn
2281-2281: Use a regular
assert
instead of unittest-styleassertIn
2282-2282: Use a regular
assert
instead of unittest-styleassertNotIn
2287-2287: Use a regular
assert
instead of unittest-styleassertFalse
2288-2288: Use a regular
assert
instead of unittest-styleassertTrue
2289-2289: Use a regular
assert
instead of unittest-styleassertIn
2297-2297: Use a regular
assert
instead of unittest-styleassertEqual
2298-2298: Use a regular
assert
instead of unittest-styleassertEqual
2299-2299: Use a regular
assert
instead of unittest-styleassertEqual
2325-2325: Use a regular
assert
instead of unittest-styleassertIn
2326-2326: Use a regular
assert
instead of unittest-styleassertIn
2327-2327: Use a regular
assert
instead of unittest-styleassertNotIn
2328-2328: Use a regular
assert
instead of unittest-styleassertNotIn
2329-2329: Use a regular
assert
instead of unittest-styleassertNotIn
2332-2332: Use a regular
assert
instead of unittest-styleassertIn
2337-2337: Use a regular
assert
instead of unittest-styleassertFalse
2338-2338: Use a regular
assert
instead of unittest-styleassertTrue
2370-2370: Use a regular
assert
instead of unittest-styleassertIn
2371-2371: Use a regular
assert
instead of unittest-styleassertIn
2372-2372: Use a regular
assert
instead of unittest-styleassertNotIn
2373-2373: Use a regular
assert
instead of unittest-styleassertNotIn
2376-2376: Use a regular
assert
instead of unittest-styleassertNotIn
2377-2377: Use a regular
assert
instead of unittest-styleassertNotIn
2382-2382: Use a regular
assert
instead of unittest-styleassertIn
2387-2387: Use a regular
assert
instead of unittest-styleassertFalse
2388-2388: Use a regular
assert
instead of unittest-styleassertTrue
2389-2389: Use a regular
assert
instead of unittest-styleassertNotIn
2394-2394: Use a regular
assert
instead of unittest-styleassertEqual
2423-2423: Use a regular
assert
instead of unittest-styleassertIn
2424-2424: Use a regular
assert
instead of unittest-styleassertIn
2425-2425: Use a regular
assert
instead of unittest-styleassertNotIn
2426-2426: Use a regular
assert
instead of unittest-styleassertNotIn
2429-2429: Use a regular
assert
instead of unittest-styleassertNotIn
2430-2430: Use a regular
assert
instead of unittest-styleassertNotIn
2435-2435: Use a regular
assert
instead of unittest-styleassertIn
2440-2440: Use a regular
assert
instead of unittest-styleassertFalse
2441-2441: Use a regular
assert
instead of unittest-styleassertTrue
2442-2442: Use a regular
assert
instead of unittest-styleassertNotIn
2447-2447: Use a regular
assert
instead of unittest-styleassertEqual
2465-2465: Use a regular
assert
instead of unittest-styleassertNotIn
2478-2478: Use a regular
assert
instead of unittest-styleassertNotIn
2512-2512: Use a regular
assert
instead of unittest-styleassertIn
2513-2513: Use a regular
assert
instead of unittest-styleassertNotIn
2514-2514: Use a regular
assert
instead of unittest-styleassertNotIn
2515-2515: Use a regular
assert
instead of unittest-styleassertIn
2516-2516: Use a regular
assert
instead of unittest-styleassertIn
2519-2519: Use a regular
assert
instead of unittest-styleassertIn
2525-2525: Use a regular
assert
instead of unittest-styleassertIn
2529-2529: Use a regular
assert
instead of unittest-styleassertTrue
2553-2553: Use a regular
assert
instead of unittest-styleassertIn
2554-2554: Use a regular
assert
instead of unittest-styleassertNotIn
2555-2555: Use a regular
assert
instead of unittest-styleassertIn
2556-2556: Line too long (119 > 107)
2559-2559: Use a regular
assert
instead of unittest-styleassertIn
2560-2560: Line too long (120 > 107)
2563-2563: Use a regular
assert
instead of unittest-styleassertIn
2564-2564: Use a regular
assert
instead of unittest-styleassertIn
2565-2565: Use a regular
assert
instead of unittest-styleassertNotIn
2568-2568: Use a regular
assert
instead of unittest-styleassertTrue
2596-2596: Use a regular
assert
instead of unittest-styleassertIn
2597-2597: Use a regular
assert
instead of unittest-styleassertNotIn
2598-2598: Use a regular
assert
instead of unittest-styleassertNotIn
2599-2599: Use a regular
assert
instead of unittest-styleassertIn
2600-2600: Use a regular
assert
instead of unittest-styleassertIn
2601-2601: Use a regular
assert
instead of unittest-styleassertNotIn
2604-2604: Use a regular
assert
instead of unittest-styleassertTrue
2638-2638: Use a regular
assert
instead of unittest-styleassertIn
2639-2639: Use a regular
assert
instead of unittest-styleassertIn
2640-2640: Use a regular
assert
instead of unittest-styleassertNotIn
2641-2641: Use a regular
assert
instead of unittest-styleassertIn
2642-2642: Use a regular
assert
instead of unittest-styleassertIn
2643-2643: Use a regular
assert
instead of unittest-styleassertFalse
2644-2644: Use a regular
assert
instead of unittest-styleassertTrue
2645-2645: Use a regular
assert
instead of unittest-styleassertIn
2650-2650: Use a regular
assert
instead of unittest-styleassertIn
2653-2653: Use a regular
assert
instead of unittest-styleassertIn
2653-2653: Use context handler for opening files
2656-2656: Use a regular
assert
instead of unittest-styleassertEqual
2657-2657: Use a regular
assert
instead of unittest-styleassertEqual
2658-2658: Use a regular
assert
instead of unittest-styleassertEqual
2659-2659: Use a regular
assert
instead of unittest-styleassertEqual
2677-2677: Use a regular
assert
instead of unittest-styleassertNotIn
2681-2681: Use a regular
assert
instead of unittest-styleassertIn
2681-2681: Use context handler for opening files
2698-2698: Unnecessary open mode parameters
2716-2716: Use a regular
assert
instead of unittest-styleassertIn
2717-2717: Use a regular
assert
instead of unittest-styleassertIn
2718-2718: Unnecessary open mode parameters
2718-2718: f-string without any placeholders
2720-2720: Use a regular
assert
instead of unittest-styleassertIn
2723-2723: Use a regular
assert
instead of unittest-styleassertEqual
2723-2723: f-string without any placeholders
2725-2725: Unnecessary open mode parameters
2725-2725: f-string without any placeholders
2727-2727: Use a regular
assert
instead of unittest-styleassertIn
2728-2728: Use a regular
assert
instead of unittest-styleassertEqual
2748-2748: Use a regular
assert
instead of unittest-styleassertIn
2749-2749: Use a regular
assert
instead of unittest-styleassertNotIn
2750-2750: Use a regular
assert
instead of unittest-styleassertIn
2751-2751: Use a regular
assert
instead of unittest-styleassertIn
2752-2752: Use a regular
assert
instead of unittest-styleassertIn
2756-2756: Unnecessary open mode parameters
2756-2756: f-string without any placeholders
2758-2758: Use a regular
assert
instead of unittest-styleassertIn
2761-2761: Use a regular
assert
instead of unittest-styleassertEqual
2763-2763: Unnecessary open mode parameters
2763-2763: f-string without any placeholders
2765-2765: Use a regular
assert
instead of unittest-styleassertIn
2769-2769: Use a regular
assert
instead of unittest-styleassertEqual
2769-2769: f-string without any placeholders
2773-2773: Use a regular
assert
instead of unittest-styleassertEqual
2774-2774: Use a regular
assert
instead of unittest-styleassertEqual
2775-2775: Prefer
next(i for i in saved_files if "INCAR" in i)
over single element slice
2776-2776: Unnecessary open mode parameters
2778-2778: Use a regular
assert
instead of unittest-styleassertIn
2781-2781: Use a regular
assert
instead of unittest-styleassertEqual
2782-2782: Use a regular
assert
instead of unittest-styleassertEqual
2787-2787: f-string without any placeholders
2803-2803: Use a regular
assert
instead of unittest-styleassertIn
2804-2804: Use a regular
assert
instead of unittest-styleassertNotIn
2805-2805: Unnecessary open mode parameters
2805-2805: f-string without any placeholders
2807-2807: Use a regular
assert
instead of unittest-styleassertIn
2810-2810: Use a regular
assert
instead of unittest-styleassertEqual
2810-2810: f-string without any placeholders
2812-2812: Unnecessary open mode parameters
2812-2812: f-string without any placeholders
2814-2814: Use a regular
assert
instead of unittest-styleassertIn
2815-2815: Use a regular
assert
instead of unittest-styleassertEqual
2816-2816: f-string without any placeholders
2842-2842: Use a regular
assert
instead of unittest-styleassertIn
2847-2847: Use a regular
assert
instead of unittest-styleassertNotIn
2859-2859: Use a regular
assert
instead of unittest-styleassertEqual
2887-2887: Use a regular
assert
instead of unittest-styleassertEqual
2888-2888: Use a regular
assert
instead of unittest-styleassertEqual
2892-2892: Use a regular
assert
instead of unittest-styleassertTrue
2898-2898: Use a regular
assert
instead of unittest-styleassertEqual
2923-2923: Use a regular
assert
instead of unittest-styleassertTrue
2928-2928: Use a regular
assert
instead of unittest-styleassertTrue
2945-2945: Use a regular
assert
instead of unittest-styleassertTrue
2967-2967: Use a regular
assert
instead of unittest-styleassertTrue
2967-2967: Unnecessary list comprehension
2968-2968: Use a regular
assert
instead of unittest-styleassertTrue
2970-2975: Unnecessary list comprehension
2978-2978: Use a regular
assert
instead of unittest-styleassertTrue
3004-3004: Use a regular
assert
instead of unittest-styleassertTrue
3017-3017: Use a regular
assert
instead of unittest-styleassertTrue
3017-3017: Unnecessary list comprehension
3018-3018: Use a regular
assert
instead of unittest-styleassertTrue
3025-3025: Use a regular
assert
instead of unittest-styleassertFalse
3034-3034: Use a regular
assert
instead of unittest-styleassertTrue
3034-3034: Unnecessary list comprehension
3035-3035: Use a regular
assert
instead of unittest-styleassertTrue
3037-3044: Unnecessary list comprehension
3047-3047: Use a regular
assert
instead of unittest-styleassertFalse
3070-3070: Use a regular
assert
instead of unittest-styleassertEqual
3086-3089: Unnecessary open mode parameters
3111-3111: Use a regular
assert
instead of unittest-styleassertNotEqual
3118-3118: Use a regular
assert
instead of unittest-styleassertEqual
3122-3122: Use a regular
assert
instead of unittest-styleassertIn
3169-3169: Use a regular
assert
instead of unittest-styleassertNotEqual
3176-3176: Use a regular
assert
instead of unittest-styleassertEqual
3180-3180: Use a regular
assert
instead of unittest-styleassertNotIn
3222-3222: Use a regular
assert
instead of unittest-styleassertEqual
3226-3226: Use a regular
assert
instead of unittest-styleassertIn
3229-3229: Use a regular
assert
instead of unittest-styleassertTrue
3230-3230: Use a regular
assert
instead of unittest-styleassertTrue
3232-3246: Unnecessary list comprehension
3283-3283: Use a regular
assert
instead of unittest-styleassertEqual
3285-3285: Use a regular
assert
instead of unittest-styleassertIn
3288-3288: Use a regular
assert
instead of unittest-styleassertTrue
3319-3319: Use a regular
assert
instead of unittest-styleassertEqual
3321-3321: Use a regular
assert
instead of unittest-styleassertIn
3324-3324: Use a regular
assert
instead of unittest-styleassertTrue
3326-3336: Unnecessary list comprehension
3368-3368: Use a regular
assert
instead of unittest-styleassertTrue
3372-3372: Use a regular
assert
instead of unittest-styleassertNotIn
3373-3373: Use a regular
assert
instead of unittest-styleassertTrue
3374-3374: Use a regular
assert
instead of unittest-styleassertTrue
3376-3385: Unnecessary list comprehension
3410-3410: Use a regular
assert
instead of unittest-styleassertTrue
3413-3415: Unnecessary open mode parameters
3415-3415: Unnecessary open mode parameters
3418-3418: Use a regular
assert
instead of unittest-styleassertDictEqual
3436-3436: Use a regular
assert
instead of unittest-styleassertTrue
3439-3441: Unnecessary open mode parameters
3441-3441: Unnecessary open mode parameters
3444-3444: Use a regular
assert
instead of unittest-styleassertDictEqual
3462-3462: Use a regular
assert
instead of unittest-styleassertTrue
3465-3467: Unnecessary open mode parameters
3467-3467: Unnecessary open mode parameters
3470-3470: Use a regular
assert
instead of unittest-styleassertDictEqual
3475-3475: Local variable
result
is assigned to but never used
3488-3488: Use a regular
assert
instead of unittest-styleassertTrue
3491-3493: Unnecessary open mode parameters
3493-3493: Unnecessary open mode parameters
3496-3496: Use a regular
assert
instead of unittest-styleassertDictEqual
3500-3500: Use triple double quotes
"""
3500-3500: First line should end with a period, question mark, or exclamation point
3516-3516: Use a regular
assert
instead of unittest-styleassertIn
3517-3517: Use a regular
assert
instead of unittest-styleassertIn
3524-3525: Explicitly concatenated string should be implicitly concatenated
3529-3529: Use a regular
assert
instead of unittest-styleassertEqual
3557-3557: Use a regular
assert
instead of unittest-styleassertTrue
3562-3562: Use a regular
assert
instead of unittest-styleassertTrue
3579-3579: Use a regular
assert
instead of unittest-styleassertIn
3611-3611: Use a regular
assert
instead of unittest-styleassertIn
3612-3612: Use a regular
assert
instead of unittest-styleassertIn
3621-3622: Explicitly concatenated string should be implicitly concatenated
3626-3626: Use a regular
assert
instead of unittest-styleassertEqual
3641-3641: Use a regular
assert
instead of unittest-styleassertTrue
3641-3641: Unnecessary list comprehension
3642-3642: Use a regular
assert
instead of unittest-styleassertTrue
3644-3648: Unnecessary list comprehension
3651-3651: Use a regular
assert
instead of unittest-styleassertIn
3652-3652: Use a regular
assert
instead of unittest-styleassertIn
3656-3656: Use a regular
assert
instead of unittest-styleassertTrue
3657-3657: Use a regular
assert
instead of unittest-styleassertTrue
3674-3674: Use a regular
assert
instead of unittest-styleassertTrue
3674-3674: Unnecessary list comprehension
3675-3675: Use a regular
assert
instead of unittest-styleassertTrue
3677-3682: Unnecessary list comprehension
3685-3685: Use a regular
assert
instead of unittest-styleassertIn
3686-3686: Use a regular
assert
instead of unittest-styleassertIn
3690-3690: Use a regular
assert
instead of unittest-styleassertTrue
3691-3691: Use a regular
assert
instead of unittest-styleassertTrue
3699-3699: Use a regular
assert
instead of unittest-styleassertIn
3706-3706: Use a regular
assert
instead of unittest-styleassertNotIn
3707-3707: Use a regular
assert
instead of unittest-styleassertFalse
3711-3711: Call
endswith
once with atuple
3717-3717: First line should end with a period, question mark, or exclamation point
3744-3744: Use a regular
assert
instead of unittest-styleassertIn
3749-3749: Use a regular
assert
instead of unittest-styleassertIn
3752-3752: Use a regular
assert
instead of unittest-styleassertEqual
3753-3753: Use a regular
assert
instead of unittest-styleassertEqual
3759-3759: Use a regular
assert
instead of unittest-styleassertTrue
3788-3788: Use a regular
assert
instead of unittest-styleassertIn
3793-3793: Use a regular
assert
instead of unittest-styleassertIn
3794-3794: Use a regular
assert
instead of unittest-styleassertEqual
3795-3795: Use a regular
assert
instead of unittest-styleassertEqual
3801-3801: Use a regular
assert
instead of unittest-styleassertTrue
3851-3851: Use a regular
assert
instead of unittest-styleassertTrue
3858-3858: Use a regular
assert
instead of unittest-styleassertTrue
3861-3861: Use a regular
assert
instead of unittest-styleassertTrue
3866-3866: Use a regular
assert
instead of unittest-styleassertNotIn
3891-3891: Use a regular
assert
instead of unittest-styleassertNotIn
3896-3896: Use a regular
assert
instead of unittest-styleassertNotIn
3899-3899: Use a regular
assert
instead of unittest-styleassertTrue
3902-3902: Use a regular
assert
instead of unittest-styleassertFalse
3903-3903: Unnecessary list comprehension
3905-3905: Use a regular
assert
instead of unittest-styleassertTrue
3906-3906: Use a regular
assert
instead of unittest-styleassertTrue
3938-3938: Use a regular
assert
instead of unittest-styleassertIn
3943-3943: Use a regular
assert
instead of unittest-styleassertIn
3944-3944: Use a regular
assert
instead of unittest-styleassertTrue
3947-3947: Use a regular
assert
instead of unittest-styleassertTrue
3949-3957: Unnecessary list comprehension
3960-3960: Use a regular
assert
instead of unittest-styleassertTrue
3966-3966: Use a regular
assert
instead of unittest-styleassertTrue
3995-3995: Use a regular
assert
instead of unittest-styleassertTrue
3998-3998: Use a regular
assert
instead of unittest-styleassertTrue
4019-4019: Use a regular
assert
instead of unittest-styleassertTrue
4019-4019: Unnecessary list comprehension
4020-4020: Use a regular
assert
instead of unittest-styleassertTrue
4022-4027: Unnecessary list comprehension
4030-4030: Use a regular
assert
instead of unittest-styleassertIn
4035-4035: Use a regular
assert
instead of unittest-styleassertIn
4036-4036: Use a regular
assert
instead of unittest-styleassertTrue
4038-4045: Unnecessary list comprehension
4048-4048: Use a regular
assert
instead of unittest-styleassertTrue
4049-4049: Use a regular
assert
instead of unittest-styleassertTrue
4056-4056: Use a regular
assert
instead of unittest-styleassertIn
4063-4063: Use a regular
assert
instead of unittest-styleassertNotIn
4063-4063: f-string without any placeholders
4064-4064: Use a regular
assert
instead of unittest-styleassertFalse
4085-4085: Use a regular
assert
instead of unittest-styleassertTrue
4088-4088: Use a regular
assert
instead of unittest-styleassertFalse
4091-4091: Use a regular
assert
instead of unittest-styleassertFalse
4101-4101: First line should end with a period, question mark, or exclamation point
4118-4118: Use a regular
assert
instead of unittest-styleassertEqual
4129-4129: Use a regular
assert
instead of unittest-styleassertIn
4133-4133: Use a regular
assert
instead of unittest-styleassertIn
4137-4137: Use a regular
assert
instead of unittest-styleassertIn
4142-4142: Use a regular
assert
instead of unittest-styleassertIn
4147-4147: Use a regular
assert
instead of unittest-styleassertIn
4152-4152: Use a regular
assert
instead of unittest-styleassertIn
4157-4157: Use a regular
assert
instead of unittest-styleassertIn
4163-4163: Use a regular
assert
instead of unittest-styleassertNotIn
4169-4169: Use a regular
assert
instead of unittest-styleassertIn
4170-4170: Use a regular
assert
instead of unittest-styleassertIn
4175-4175: Use a regular
assert
instead of unittest-styleassertIn
4211-4211: Use a regular
assert
instead of unittest-styleassertEqual
4229-4229: Use a regular
assert
instead of unittest-styleassertIn
4233-4233: Use a regular
assert
instead of unittest-styleassertIn
4237-4237: Use a regular
assert
instead of unittest-styleassertIn
4242-4242: Use a regular
assert
instead of unittest-styleassertFalse
4254-4254: Use a regular
assert
instead of unittest-styleassertIn
4260-4260: Use a regular
assert
instead of unittest-styleassertEqual
4264-4264: First line should end with a period, question mark, or exclamation point
4277-4277: Use a regular
assert
instead of unittest-styleassertTrue
4280-4280: Use a regular
assert
instead of unittest-styleassertIn
4288-4288: Use a regular
assert
instead of unittest-styleassertEqual
4306-4306: Use a regular
assert
instead of unittest-styleassertTrue
4311-4311: Use a regular
assert
instead of unittest-styleassertIn
4319-4319: Use a regular
assert
instead of unittest-styleassertEqual
4335-4335: Use a regular
assert
instead of unittest-styleassertFalse
4338-4338: Use a regular
assert
instead of unittest-styleassertIsInstance
4339-4339: Use a regular
assert
instead of unittest-styleassertIn
4348-4348: Use a regular
assert
instead of unittest-styleassertTrue
4349-4349: Use a regular
assert
instead of unittest-styleassertIn
4357-4357: Use a regular
assert
instead of unittest-styleassertEqual
4371-4371: Use a regular
assert
instead of unittest-styleassertTrue
4371-4371: Unnecessary list comprehension
4372-4372: Use a regular
assert
instead of unittest-styleassertTrue
4374-4379: Unnecessary list comprehension
4382-4382: Use a regular
assert
instead of unittest-styleassertTrue
4383-4383: Use a regular
assert
instead of unittest-styleassertIn
4391-4391: Use a regular
assert
instead of unittest-styleassertEqual
4401-4401: Use a regular
assert
instead of unittest-styleassertIsInstance
4402-4402: Use a regular
assert
instead of unittest-styleassertIn
4413-4413: f-string without any placeholders
4417-4417: f-string without any placeholders
4432-4432: Use a regular
assert
instead of unittest-styleassertTrue
4438-4438: Use a regular
assert
instead of unittest-styleassertEqual
4440-4440: Use a regular
assert
instead of unittest-styleassertFalse
4452-4452: Use a regular
assert
instead of unittest-styleassertTrue
4455-4455: Use a regular
assert
instead of unittest-styleassertIn
4466-4466: Use a regular
assert
instead of unittest-styleassertEqual
4482-4482: Use a regular
assert
instead of unittest-styleassertTrue
4485-4485: Use a regular
assert
instead of unittest-styleassertFalse
4492-4492: Use a regular
assert
instead of unittest-styleassertEqual
4508-4508: Use a regular
assert
instead of unittest-styleassertTrue
4509-4509: Use a regular
assert
instead of unittest-styleassertIn
4518-4518: Use a regular
assert
instead of unittest-styleassertEqual
4541-4541: Use a regular
assert
instead of unittest-styleassertTrue
4541-4541: f-string without any placeholders
4542-4542: f-string without any placeholders
4543-4543: f-string without any placeholders
4544-4544: Use a regular
assert
instead of unittest-styleassertEqual
4548-4548: First line should end with a period, question mark, or exclamation point
4555-4555: Use a regular
assert
instead of unittest-styleassertIn
4556-4556: Use a regular
assert
instead of unittest-styleassertEqual
4561-4561: Use a regular
assert
instead of unittest-styleassertIn
4562-4562: Use a regular
assert
instead of unittest-styleassertEqual
4566-4566: Use a regular
assert
instead of unittest-styleassertFalse
4567-4567: Use a regular
assert
instead of unittest-styleassertEqual
4573-4573: Use a regular
assert
instead of unittest-styleassertIn
4574-4574: Use a regular
assert
instead of unittest-styleassertEqual
tests/test_input.py (413)
1-1: Missing docstring in public module
1-30: Import block is un-sorted or un-formatted
30-30: Missing docstring in public function
54-54: Missing blank line before section ("Args")
74-74: Do not perform function call
DummySpecies
in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable
81-85: Prefer
next(...)
over single element slice
102-102: First line should end with a period, question mark, or exclamation point
166-166: Avoid quadratic list summation
167-169: Avoid quadratic list summation
466-466: Call
endswith
once with atuple
480-480: Use a regular
assert
instead of unittest-styleassertEqual
484-484: Use a regular
assert
instead of unittest-styleassertEqual
487-487: Use a regular
assert
instead of unittest-styleassertEqual
488-488: Use a regular
assert
instead of unittest-styleassertEqual
489-489: Use a regular
assert
instead of unittest-styleassertEqual
490-490: Use a regular
assert
instead of unittest-styleassertEqual
491-491: Use a regular
assert
instead of unittest-styleassertEqual
492-492: Use a regular
assert
instead of unittest-styleassertEqual
493-493: Use a regular
assert
instead of unittest-styleassertEqual
494-494: Use a regular
assert
instead of unittest-styleassertEqual
495-495: Use a regular
assert
instead of unittest-styleassertEqual
496-496: Use a regular
assert
instead of unittest-styleassertEqual
497-497: Use a regular
assert
instead of unittest-styleassertEqual
498-498: Use a regular
assert
instead of unittest-styleassertEqual
499-499: Use a regular
assert
instead of unittest-styleassertEqual
500-500: Use a regular
assert
instead of unittest-styleassertEqual
501-501: Use a regular
assert
instead of unittest-styleassertEqual
502-502: Use a regular
assert
instead of unittest-styleassertEqual
503-503: Use a regular
assert
instead of unittest-styleassertEqual
504-504: Use a regular
assert
instead of unittest-styleassertEqual
507-507: Use a regular
assert
instead of unittest-styleassertEqual
508-508: Use a regular
assert
instead of unittest-styleassertEqual
509-509: Use a regular
assert
instead of unittest-styleassertEqual
510-510: Use a regular
assert
instead of unittest-styleassertEqual
511-511: Use a regular
assert
instead of unittest-styleassertEqual
512-512: Use a regular
assert
instead of unittest-styleassertEqual
526-526: Use a regular
assert
instead of unittest-styleassertEqual
530-530: First line should end with a period, question mark, or exclamation point
554-554: Use a regular
assert
instead of unittest-styleassertEqual
573-573: First line should end with a period, question mark, or exclamation point
574-574: Use a regular
assert
instead of unittest-styleassertEqual
575-575: Use a regular
assert
instead of unittest-styleassertEqual
576-576: Use a regular
assert
instead of unittest-styleassertEqual
577-577: Use a regular
assert
instead of unittest-styleassertEqual
578-578: Use a regular
assert
instead of unittest-styleassertEqual
579-579: Use a regular
assert
instead of unittest-styleassertEqual
580-580: Use a regular
assert
instead of unittest-styleassertEqual
581-581: Use a regular
assert
instead of unittest-styleassertEqual
582-582: Use a regular
assert
instead of unittest-styleassertEqual
585-585: First line should end with a period, question mark, or exclamation point
617-617: Use a regular
assert
instead of unittest-styleassertNotEqual
629-629: Use a regular
assert
instead of unittest-styleassertEqual
635-635: First line should end with a period, question mark, or exclamation point
675-675: Use a regular
assert
instead of unittest-styleassertEqual
679-679: Use a regular
assert
instead of unittest-styleassertDictEqual
683-683: First line should end with a period, question mark, or exclamation point
700-700: Use a regular
assert
instead of unittest-styleassertEqual
704-704: Use a regular
assert
instead of unittest-styleassertEqual
707-707: Use a regular
assert
instead of unittest-styleassertEqual
708-708: Use a regular
assert
instead of unittest-styleassertEqual
709-709: Use a regular
assert
instead of unittest-styleassertEqual
710-710: Use a regular
assert
instead of unittest-styleassertCountEqual
727-727: f-string without any placeholders
727-728: Explicitly concatenated string should be implicitly concatenated
757-757: Use a regular
assert
instead of unittest-styleassertEqual
761-761: Use a regular
assert
instead of unittest-styleassertEqual
764-764: Use a regular
assert
instead of unittest-styleassertEqual
765-765: Use a regular
assert
instead of unittest-styleassertEqual
772-773: Multi-line docstring closing quotes should be on a separate line
772-773: First line should end with a period, question mark, or exclamation point
813-813: Use a regular
assert
instead of unittest-styleassertEqual
819-819: First line should end with a period, question mark, or exclamation point
828-828: Use a regular
assert
instead of unittest-styleassertEqual
834-834: Use a regular
assert
instead of unittest-styleassertNotEqual
835-835: Use a regular
assert
instead of unittest-styleassertEqual
849-849: Use a regular
assert
instead of unittest-styleassertNotEqual
850-850: Use a regular
assert
instead of unittest-styleassertEqual
884-884: Use a regular
assert
instead of unittest-styleassertIn
885-885: Use a regular
assert
instead of unittest-styleassertNotEqual
893-893: Use a regular
assert
instead of unittest-styleassertIn
894-894: Use a regular
assert
instead of unittest-styleassertIn
896-896: Use a regular
assert
instead of unittest-styleassertIn
899-899: First line should end with a period, question mark, or exclamation point
908-908: Use a regular
assert
instead of unittest-styleassertEqual
913-913: Use a regular
assert
instead of unittest-styleassertNotEqual
914-914: Use a regular
assert
instead of unittest-styleassertEqual
924-924: First line should end with a period, question mark, or exclamation point
934-934: Use a regular
assert
instead of unittest-styleassertEqual
938-938: Use a regular
assert
instead of unittest-styleassertEqual
946-946: Use a regular
assert
instead of unittest-styleassertNotEqual
947-947: Use a regular
assert
instead of unittest-styleassertEqual
955-955: f-string without any placeholders
955-956: Explicitly concatenated string should be implicitly concatenated
982-982: Use a regular
assert
instead of unittest-styleassertEqual
986-986: Use a regular
assert
instead of unittest-styleassertEqual
994-994: Use a regular
assert
instead of unittest-styleassertNotEqual
995-995: Use a regular
assert
instead of unittest-styleassertEqual
1002-1002: First line should end with a period, question mark, or exclamation point
1014-1014: Use a regular
assert
instead of unittest-styleassertEqual
1019-1019: Use a regular
assert
instead of unittest-styleassertNotEqual
1021-1021: Use a regular
assert
instead of unittest-styleassertEqual
1022-1022: Use a regular
assert
instead of unittest-styleassertEqual
1026-1026: Use a regular
assert
instead of unittest-styleassertEqual
1029-1029: First line should end with a period, question mark, or exclamation point
1037-1037: Use a regular
assert
instead of unittest-styleassertEqual
1039-1039: Single quotes found but double quotes preferred
1039-1039: Single quotes found but double quotes preferred
1044-1044: No blank lines allowed after function docstring (found 1)
1044-1044: First line should end with a period, question mark, or exclamation point
1069-1069: Use a regular
assert
instead of unittest-styleassertFalse
1079-1079: Use a regular
assert
instead of unittest-styleassertEqual
1126-1126: Use a regular
assert
instead of unittest-styleassertEqual
1159-1159: Use a regular
assert
instead of unittest-styleassertEqual
1184-1184: Comment contains ambiguous
–
(EN DASH). Did you mean-
(HYPHEN-MINUS)?
1218-1218: Use a regular
assert
instead of unittest-styleassertFalse
1220-1220: Use a regular
assert
instead of unittest-styleassertEqual
1221-1221: Use a regular
assert
instead of unittest-styleassertEqual
1224-1224: Use a regular
assert
instead of unittest-styleassertEqual
1242-1242: Line too long (261 > 107)
1244-1244: Use a regular
assert
instead of unittest-styleassertTrue
1245-1245: Use a regular
assert
instead of unittest-styleassertFalse
1247-1247: Use a regular
assert
instead of unittest-styleassertEqual
1250-1250: Use a regular
assert
instead of unittest-styleassertEqual
1252-1252: Use a regular
assert
instead of unittest-styleassertEqual
1255-1255: Use a regular
assert
instead of unittest-styleassertEqual
1256-1256: Use a regular
assert
instead of unittest-styleassertEqual
1266-1266: Use a regular
assert
instead of unittest-styleassertEqual
1269-1269: Use a regular
assert
instead of unittest-styleassertEqual
1270-1270: Use a regular
assert
instead of unittest-styleassertEqual
1274-1274: Use a regular
assert
instead of unittest-styleassertTrue
1281-1281: Use a regular
assert
instead of unittest-styleassertFalse
1282-1282: Use a regular
assert
instead of unittest-styleassertTrue
1283-1283: Use a regular
assert
instead of unittest-styleassertTrue
1286-1286: First line should end with a period, question mark, or exclamation point
1292-1292: Use a regular
assert
instead of unittest-styleassertEqual
1293-1293: Use a regular
assert
instead of unittest-styleassertEqual
1297-1297: Use a regular
assert
instead of unittest-styleassertEqual
1306-1306: Use a regular
assert
instead of unittest-styleassertEqual
1307-1307: Use a regular
assert
instead of unittest-styleassertEqual
1311-1311: Use a regular
assert
instead of unittest-styleassertEqual
1320-1320: Use a regular
assert
instead of unittest-styleassertEqual
1321-1321: Use a regular
assert
instead of unittest-styleassertEqual
1324-1324: Use a regular
assert
instead of unittest-styleassertEqual
1339-1339: Use a regular
assert
instead of unittest-styleassertEqual
1350-1350: Use a regular
assert
instead of unittest-styleassertEqual
1357-1357: Use a regular
assert
instead of unittest-styleassertDictEqual
1382-1382: Use a regular
assert
instead of unittest-styleassertDictEqual
1456-1456: Use a regular
assert
instead of unittest-styleassertEqual
1499-1499: Use a regular
assert
instead of unittest-styleassertEqual
1500-1500: Use a regular
assert
instead of unittest-styleassertAlmostEqual
1501-1501: Use a regular
assert
instead of unittest-styleassertIn
1502-1502: Use a regular
assert
instead of unittest-styleassertEqual
1542-1542: Use a regular
assert
instead of unittest-styleassertEqual
1543-1543: Use a regular
assert
instead of unittest-styleassertAlmostEqual
1544-1544: Use a regular
assert
instead of unittest-styleassertIn
1545-1545: Use a regular
assert
instead of unittest-styleassertIn
1546-1546: Use a regular
assert
instead of unittest-styleassertEqual
1547-1547: Use a regular
assert
instead of unittest-styleassertEqual
1550-1550: First line should end with a period, question mark, or exclamation point
1555-1555: Use a regular
assert
instead of unittest-styleassertEqual
1558-1558: First line should end with a period, question mark, or exclamation point
1571-1572: Use a single
with
statement with multiple contexts instead of nestedwith
statements
1579-1579: Use a regular
assert
instead of unittest-styleassertTrue
1607-1607: Implicitly concatenated string literals on one line
1623-1623: Implicitly concatenated string literals on one line
1632-1632: Use a regular
assert
instead of unittest-styleassertTrue
1634-1634: Use a regular
assert
instead of unittest-styleassertEqual
1637-1637: Use a regular
assert
instead of unittest-styleassertEqual
1641-1641: Use a regular
assert
instead of unittest-styleassertEqual
1643-1643: Use a regular
assert
instead of unittest-styleassertEqual
1667-1667: Use a regular
assert
instead of unittest-styleassertTrue
1669-1669: Use a regular
assert
instead of unittest-styleassertEqual
1672-1672: Use a regular
assert
instead of unittest-styleassertEqual
1676-1676: Use a regular
assert
instead of unittest-styleassertNotEqual
1680-1680: Use a regular
assert
instead of unittest-styleassertEqual
1702-1702: Use a regular
assert
instead of unittest-styleassertFalse
1724-1724: Use a regular
assert
instead of unittest-styleassertEqual
1728-1728: Use a regular
assert
instead of unittest-styleassertEqual
1731-1731: Use a regular
assert
instead of unittest-styleassertEqual
1736-1736: Use a regular
assert
instead of unittest-styleassertFalse
1737-1737: Use a regular
assert
instead of unittest-styleassertTrue
1738-1738: Use a regular
assert
instead of unittest-styleassertTrue
1740-1740: Use a regular
assert
instead of unittest-styleassertTrue
1741-1741: Use a regular
assert
instead of unittest-styleassertFalse
1742-1742: Use a regular
assert
instead of unittest-styleassertTrue
1776-1776: Use a regular
assert
instead of unittest-styleassertEqual
1780-1780: Use a regular
assert
instead of unittest-styleassertEqual
1800-1801: Use a single
with
statement with multiple contexts instead of nestedwith
statements
1948-1948: Use a regular
assert
instead of unittest-styleassertTrue
1979-1979: f-string without any placeholders
1979-1980: Explicitly concatenated string should be implicitly concatenated
1986-1986: Use a regular
assert
instead of unittest-styleassertTrue
1990-1990: Use a regular
assert
instead of unittest-styleassertEqual
1994-1994: Use a regular
assert
instead of unittest-styleassertEqual
2027-2027: Use a regular
assert
instead of unittest-styleassertTrue
2043-2043: Use a regular
assert
instead of unittest-styleassertTrue
2048-2048: Use a regular
assert
instead of unittest-styleassertTrue
2054-2054: Use a regular
assert
instead of unittest-styleassertFalse
2090-2090: Use a regular
assert
instead of unittest-styleassertTrue
2091-2091: Use a regular
assert
instead of unittest-styleassertTrue
2095-2095: Use a regular
assert
instead of unittest-styleassertEqual
2099-2099: Use a regular
assert
instead of unittest-styleassertEqual
2127-2127: Use a regular
assert
instead of unittest-styleassertEqual
2132-2132: First line should end with a period, question mark, or exclamation point
2138-2139: Use a single
with
statement with multiple contexts instead of nestedwith
statements
2146-2146: Use
key in dict
instead ofkey in dict.keys()
2147-2147: Use a regular
assert
instead of unittest-styleassertTrue
2148-2148: Use a regular
assert
instead of unittest-styleassertTrue
2149-2149: Use a regular
assert
instead of unittest-styleassertTrue
2150-2150: Use a regular
assert
instead of unittest-styleassertTrue
2152-2152: Use a regular
assert
instead of unittest-styleassertTrue
2153-2153: Use a regular
assert
instead of unittest-styleassertTrue
2197-2197: Use a regular
assert
instead of unittest-styleassertTrue
2199-2199: Use a regular
assert
instead of unittest-styleassertEqual
2202-2202: Use a regular
assert
instead of unittest-styleassertEqual
2207-2207: Use a regular
assert
instead of unittest-styleassertEqual
2231-2231: Use a regular
assert
instead of unittest-styleassertTrue
2233-2233: Use a regular
assert
instead of unittest-styleassertEqual
2236-2236: Use a regular
assert
instead of unittest-styleassertEqual
2241-2241: Use a regular
assert
instead of unittest-styleassertEqual
2262-2262: Use a regular
assert
instead of unittest-styleassertTrue
2274-2274: Use a regular
assert
instead of unittest-styleassertTrue
2275-2275: Use a regular
assert
instead of unittest-styleassertTrue
2276-2276: Use a regular
assert
instead of unittest-styleassertTrue
2278-2278: Use a regular
assert
instead of unittest-styleassertTrue
2279-2279: Use a regular
assert
instead of unittest-styleassertTrue
2304-2304: Use a regular
assert
instead of unittest-styleassertEqual
2310-2310: Use a regular
assert
instead of unittest-styleassertEqual
2315-2315: Use a regular
assert
instead of unittest-styleassertEqual
2338-2339: Use a single
with
statement with multiple contexts instead of nestedwith
statements
2361-2362: Use a single
with
statement with multiple contexts instead of nestedwith
statements
2389-2390: Use a single
with
statement with multiple contexts instead of nestedwith
statements
2418-2419: Use a single
with
statement with multiple contexts instead of nestedwith
statements
2438-2438: Use a regular
assert
instead of unittest-styleassertTrue
2439-2439: Use a regular
assert
instead of unittest-styleassertTrue
2442-2442: Use a regular
assert
instead of unittest-styleassertTrue
2445-2445: Use a regular
assert
instead of unittest-styleassertTrue
2450-2450: Use a regular
assert
instead of unittest-styleassertTrue
2453-2453: Use a regular
assert
instead of unittest-styleassertTrue
2458-2459: Use a single
with
statement with multiple contexts instead of nestedwith
statements
2465-2465: Use a regular
assert
instead of unittest-styleassertEqual
2480-2480: First line should end with a period, question mark, or exclamation point
2500-2500: Use a regular
assert
instead of unittest-styleassertEqual
2501-2501: Use
key in dict
instead ofkey in dict.keys()
2555-2555: Use a regular
assert
instead of unittest-styleassertNotEqual
2558-2558: Use a regular
assert
instead of unittest-styleassertDictEqual
2570-2570: Use a regular
assert
instead of unittest-styleassertTrue
2577-2577: Use a regular
assert
instead of unittest-styleassertDictEqual
2581-2581: Use a regular
assert
instead of unittest-styleassertDictEqual
2592-2592: Use
pytest.raises
instead of unittest-styleassertRaises
2598-2598: Use a regular
assert
instead of unittest-styleassertIn
2623-2623: Use a regular
assert
instead of unittest-styleassertEqual
2624-2626: Prefer
next(...)
over single element slice
2627-2627: Prefer
next(...)
over single element slice
2631-2631: Use a regular
assert
instead of unittest-styleassertFalse
2650-2650: Implicitly concatenated string literals on one line
2653-2653: Implicitly concatenated string literals on one line
2656-2656: Implicitly concatenated string literals on one line
2660-2660: Implicitly concatenated string literals on one line
2663-2663: Implicitly concatenated string literals on one line
2666-2666: Implicitly concatenated string literals on one line
2669-2669: Implicitly concatenated string literals on one line
2680-2680: Implicitly concatenated string literals on one line
2693-2693: Use a regular
assert
instead of unittest-styleassertTrue
2695-2695: Use a regular
assert
instead of unittest-styleassertEqual
2699-2699: Use a regular
assert
instead of unittest-styleassertEqual
2703-2703: Use a regular
assert
instead of unittest-styleassertNotEqual
2707-2707: Use a regular
assert
instead of unittest-styleassertTrue
2709-2709: Use a regular
assert
instead of unittest-styleassertEqual
2713-2713: Use a regular
assert
instead of unittest-styleassertEqual
2716-2716: Use a regular
assert
instead of unittest-styleassertEqual
2758-2758: Use a regular
assert
instead of unittest-styleassertTrue
2761-2761: Use a regular
assert
instead of unittest-styleassertFalse
2763-2763: Use a regular
assert
instead of unittest-styleassertDictEqual
2768-2768: Use a regular
assert
instead of unittest-styleassertDictEqual
2777-2777: Use
pytest.raises
instead of unittest-styleassertRaises
2783-2783: Use a regular
assert
instead of unittest-styleassertIn
2824-2824: Use a regular
assert
instead of unittest-styleassertTrue
2827-2827: Use a regular
assert
instead of unittest-styleassertFalse
2828-2828: Use a regular
assert
instead of unittest-styleassertFalse
2829-2829: Use a regular
assert
instead of unittest-styleassertTrue
2830-2830: Use a regular
assert
instead of unittest-styleassertFalse
2835-2835: First line should end with a period, question mark, or exclamation point
2860-2860: Use a regular
assert
instead of unittest-styleassertTrue
2869-2869: Use a regular
assert
instead of unittest-styleassertEqual
2884-2884: Use a regular
assert
instead of unittest-styleassertEqual
2908-2908: Use a regular
assert
instead of unittest-styleassertEqual
2914-2914: First line should end with a period, question mark, or exclamation point
2932-2932: Use a regular
assert
instead of unittest-styleassertTrue
2943-2943: Use a regular
assert
instead of unittest-styleassertEqual
2955-2955: Use a regular
assert
instead of unittest-styleassertEqual
2961-2961: Use a regular
assert
instead of unittest-styleassertFalse
2964-2964: Use a regular
assert
instead of unittest-styleassertTrue
2983-2983: Use a regular
assert
instead of unittest-styleassertEqual
2989-2989: First line should end with a period, question mark, or exclamation point
3006-3006: Use a regular
assert
instead of unittest-styleassertTrue
3019-3019: Use a regular
assert
instead of unittest-styleassertEqual
3030-3030: Use a regular
assert
instead of unittest-styleassertEqual
3036-3036: Use a regular
assert
instead of unittest-styleassertFalse
3039-3039: Use a regular
assert
instead of unittest-styleassertTrue
3056-3056: Use a regular
assert
instead of unittest-styleassertEqual
3062-3062: First line should end with a period, question mark, or exclamation point
3080-3080: Use a regular
assert
instead of unittest-styleassertTrue
3091-3091: Use a regular
assert
instead of unittest-styleassertEqual
3105-3105: Use a regular
assert
instead of unittest-styleassertFalse
3106-3106: Use a regular
assert
instead of unittest-styleassertTrue
3131-3131: Use a regular
assert
instead of unittest-styleassertEqual
3136-3136: First line should end with a period, question mark, or exclamation point
3161-3161: Use a regular
assert
instead of unittest-styleassertEqual
3191-3191: Use a regular
assert
instead of unittest-styleassertFalse
3204-3204: Use a regular
assert
instead of unittest-styleassertFalse
3206-3206: Use a regular
assert
instead of unittest-styleassertEqual
3234-3234: Use a regular
assert
instead of unittest-styleassertTrue
3236-3245: Unnecessary list comprehension
3237-3237: Unnecessary list comprehension
3251-3251: Use a regular
assert
instead of unittest-styleassertEqual
3252-3252: Use a regular
assert
instead of unittest-styleassertFalse
3253-3253: Use a regular
assert
instead of unittest-styleassertTrue
3258-3258: Use a regular
assert
instead of unittest-styleassertFalse
3259-3259: Use a regular
assert
instead of unittest-styleassertEqual
3263-3263: Use a regular
assert
instead of unittest-styleassertFalse
3265-3274: Unnecessary list comprehension
3266-3266: Unnecessary list comprehension
3280-3280: Use a regular
assert
instead of unittest-styleassertEqual
3281-3281: Use a regular
assert
instead of unittest-styleassertFalse
3282-3282: Use a regular
assert
instead of unittest-styleassertTrue
3307-3307: Use a regular
assert
instead of unittest-styleassertEqual
3311-3311: Use a regular
assert
instead of unittest-styleassertFalse
3313-3322: Unnecessary list comprehension
3314-3314: Unnecessary list comprehension
3328-3328: Use a regular
assert
instead of unittest-styleassertEqual
3329-3329: Use a regular
assert
instead of unittest-styleassertTrue
3330-3330: Use a regular
assert
instead of unittest-styleassertTrue
3333-3333: First line should end with a period, question mark, or exclamation point
3340-3340: Use a regular
assert
instead of unittest-styleassertEqual
3341-3341: Single quotes found but double quotes preferred
3341-3341: Single quotes found but double quotes preferred
3341-3341: Single quotes found but double quotes preferred
3342-3342: Single quotes found but double quotes preferred
3342-3342: Single quotes found but double quotes preferred
3352-3352: Use a regular
assert
instead of unittest-styleassertEqual
3355-3355: f-string without any placeholders
3356-3356: f-string without any placeholders
3357-3357: f-string without any placeholders
3358-3358: f-string without any placeholders
3361-3361: Use a regular
assert
instead of unittest-styleassertEqual
3362-3362: Single quotes found but double quotes preferred
3362-3362: Single quotes found but double quotes preferred
3362-3362: Single quotes found but double quotes preferred
3363-3363: Single quotes found but double quotes preferred
3363-3363: Single quotes found but double quotes preferred
3369-3369: First line should end with a period, question mark, or exclamation point
3385-3385: Use a regular
assert
instead of unittest-styleassertTrue
3399-3399: Use a regular
assert
instead of unittest-styleassertEqual
3408-3408: Use a regular
assert
instead of unittest-styleassertTrue
3446-3446: Use a regular
assert
instead of unittest-styleassertEqual
3454-3454: No whitespaces allowed surrounding docstring text
3454-3454: First line should end with a period, question mark, or exclamation point
3470-3470: Use a regular
assert
instead of unittest-styleassertTrue
3477-3477: Use a regular
assert
instead of unittest-styleassertEqual
3484-3484: Use a regular
assert
instead of unittest-styleassertTrue
3512-3512: Use a regular
assert
instead of unittest-styleassertEqual
3518-3520: First line should end with a period, question mark, or exclamation point
3529-3529: Use a regular
assert
instead of unittest-styleassertEqual
3530-3534: Prefer
next(...)
over single element slice
3535-3539: Prefer
next(...)
over single element slice
3557-3557: Implicitly concatenated string literals on one line
3560-3560: Implicitly concatenated string literals on one line
3563-3563: Implicitly concatenated string literals on one line
3568-3568: Use a regular
assert
instead of unittest-styleassertTrue
3570-3570: Use a regular
assert
instead of unittest-styleassertEqual
3574-3574: Use a regular
assert
instead of unittest-styleassertEqual
3577-3577: Use a regular
assert
instead of unittest-styleassertNotEqual
3594-3594: Use a regular
assert
instead of unittest-styleassertEqual
3595-3599: Prefer
next(...)
over single element slice
3600-3604: Prefer
next(...)
over single element slice
3607-3607: Use a regular
assert
instead of unittest-styleassertEqual
3608-3612: Prefer
next(...)
over single element slice
3613-3617: Prefer
next(...)
over single element slice
3622-3622: Use a regular
assert
instead of unittest-styleassertTrue
3624-3624: Use a regular
assert
instead of unittest-styleassertEqual
3627-3627: Use a regular
assert
instead of unittest-styleassertEqual
3631-3631: Use a regular
assert
instead of unittest-styleassertEqual
3665-3665: Use a regular
assert
instead of unittest-styleassertEqual
3666-3670: Prefer
next(...)
over single element slice
3671-3675: Prefer
next(...)
over single element slice
3687-3687: Use a regular
assert
instead of unittest-styleassertEqual
3688-3692: Prefer
next(...)
over single element slice
3693-3697: Prefer
next(...)
over single element slice
3718-3718: Use a regular
assert
instead of unittest-styleassertEqual
3719-3719: Use a regular
assert
instead of unittest-styleassertEqual
3723-3723: Unnecessary
list
literal passed tolist()
(remove the outer call tolist()
)
3734-3734: Use a regular
assert
instead of unittest-styleassertEqual
3735-3739: Prefer
next(...)
over single element slice
3737-3737: Prefer
next(iter(dist.defects_dict.keys()))
over single element slice
3740-3744: Prefer
next(...)
over single element slice
3753-3753: Use a regular
assert
instead of unittest-styleassertEqual
3756-3756: f-string without any placeholders
3757-3757: f-string without any placeholders
3758-3758: f-string without any placeholders
3759-3759: f-string without any placeholders
3766-3766: Use a regular
assert
instead of unittest-styleassertEqual
3767-3771: Prefer
next(...)
over single element slice
3772-3776: Prefer
next(...)
over single element slice
3780-3780: Use
pytest.raises
instead of unittest-styleassertRaises
3787-3787: Use a regular
assert
instead of unittest-styleassertIn
3797-3797: Use a regular
assert
instead of unittest-styleassertTrue
3800-3800: Use a regular
assert
instead of unittest-styleassertFalse
3801-3801: Use a regular
assert
instead of unittest-styleassertTrue
3809-3809: Use a regular
assert
instead of unittest-styleassertTrue
3812-3812: Use a regular
assert
instead of unittest-styleassertFalse
3813-3813: Use a regular
assert
instead of unittest-styleassertTrue
3814-3814: Use a regular
assert
instead of unittest-styleassertFalse
Additional comments not posted (19)
tests/data/cp2k/vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input.inp (1)
14-14
: Ensure that the system being studied requires spin-polarized calculations. If not, settingSPIN_POLARIZED
to.TRUE.
may lead to unnecessary computational overhead.tests/data/cp2k/vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input_user_parameters.inp (1)
14-14
: Ensure that the system being studied does not require spin-polarized calculations. If it does, settingSPIN_POLARIZED
to.FALSE.
may lead to incorrect results.shakenbreak/SnB_run.sh (1)
Line range hint
1-1
: The script follows best practices for shell scripting and the logic appears to be correct.README.md (1)
131-135
: Ensure that the new studies added to the README are correctly formatted and the links are valid.shakenbreak/cli.py (10)
12-12
: New imports fromdoped.core
anddoped.generation
are added. Ensure these are necessary and used within the file to avoid unnecessary dependencies.
55-61
: The loop correctly sets CLI options using a config file. Ensure thatconfig_data
contains valid parameters and that this logic does not override user-specified options unintentionally.
67-67
: TheCONTEXT_SETTINGS
dictionary is defined to customize the help option names. This is a good practice for improving user experience.
72-72
: The docstring for thesnb
command group is clear and concise, providing a brief description of the tool.
114-116
: The new--padding
option is added to thegenerate
command. Ensure that this option is correctly handled in the command logic and that its default value is appropriate.
273-273
: TheValueError
raised whenmin_charge
ormax_charge
is not set ensures that both options are provided together. This is a good practice for input validation.
286-286
: The warning aboutcharges
being specified in both CLI options and the config file helps prevent conflicts and ensures that the correct values are used.
304-304
: The print statement informing about the defect charge states provides useful feedback to the user. Ensure that this information is accurate and helpful.
468-483
: The logic for parsing bulk oxidation states is well-structured and includes a fallback mechanism if the cost of guessing oxidation states is too high. Ensure that theQueue
import is necessary and used efficiently.
577-582
: The updates to theparse_defect_charges
function simplify the logic and improve readability. Ensure that the function handles all edge cases correctly.shakenbreak/input.py (2)
120-128
: The conversion of charge keys back to integers is necessary for correct processing. This change looks good.
451-454
: The update of INCAR settings withROPT
is appropriate for the number of elements. This change looks good.tests/test_input.py (2)
19-19
: The import statement forSpecies
has been removed. Ensure that this removal does not affect any functionality that previously relied onSpecies
.
107-115
: ThesetUpClass
method initializes several class variables. Ensure that these paths and initializations are correct and necessary for the tests.tests/test_cli.py (1)
Line range hint
3976-3984
: LGTM!
@@ -12,15 +12,21 @@ | |||
import shutil | |||
import warnings | |||
from importlib.metadata import version | |||
from typing import Optional, Tuple, Type, Union | |||
from multiprocessing import Queue |
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.
Consider using a more specific import for Queue
to avoid potential namespace conflicts.
- from multiprocessing import Queue
+ from multiprocessing import Queue as MPQueue
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
from multiprocessing import Queue | |
from multiprocessing import Queue as MPQueue |
formatted_distorted_charge = ( | ||
f"{'+' if distorted_charge > 0 else ''}{distorted_charge}" | ||
) | ||
formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}" |
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.
Use consistent string formatting for formatted_distorted_charge
.
To maintain consistency and readability, consider using f-string formatting for the entire expression.
- formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}"
+ formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}" | |
formatted_distorted_charge = f"{'+' if distorted_charge > 0 else ''}{distorted_charge}" |
default_incar_settings = loadfn( | ||
os.path.join(MODULE_DIR, "../SnB_input_files/incar.yaml") | ||
) | ||
default_incar_settings = loadfn(os.path.join(MODULE_DIR, "../SnB_input_files/incar.yaml")) |
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.
Ensure that the file path construction is robust against path traversal vulnerabilities.
- default_incar_settings = loadfn(os.path.join(MODULE_DIR, "../SnB_input_files/incar.yaml"))
+ default_incar_settings = loadfn(os.path.join(MODULE_DIR, "SnB_input_files", "incar.yaml"))
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
default_incar_settings = loadfn(os.path.join(MODULE_DIR, "../SnB_input_files/incar.yaml")) | |
default_incar_settings = loadfn(os.path.join(MODULE_DIR, "SnB_input_files", "incar.yaml")) |
defect_name_wout_charge, charge_state = defect_name.rsplit( | ||
"_", 1 | ||
) # `defect_name` includes charge | ||
defect_name_wout_charge, charge_state = defect_name.rsplit("_", 1) # `defect_name` includes charge |
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.
Validate the split operation to ensure defect_name
contains an underscore to avoid runtime errors.
+ if "_" not in defect_name:
+ raise ValueError("Expected an underscore in defect_name to split correctly.")
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
defect_name_wout_charge, charge_state = defect_name.rsplit("_", 1) # `defect_name` includes charge | |
if "_" not in defect_name: | |
raise ValueError("Expected an underscore in defect_name to split correctly.") | |
defect_name_wout_charge, charge_state = defect_name.rsplit("_", 1) # `defect_name` includes charge |
if isinstance(distorted_distortion, str): | ||
return f"{output_path}/{defect_species}/{distorted_distortion}" | ||
else: | ||
return ( | ||
f"{output_path}/{defect_species}/Bond_Distortion_" | ||
f"{round(distorted_distortion * 100, 1) + 0}%_from_{formatted_distorted_charge}" | ||
) | ||
|
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.
Consider simplifying the return statement for readability.
The return statement can be simplified by removing the redundant check for distorted_distortion
.
- if isinstance(distorted_distortion, str):
- return f"{output_path}/{defect_species}/{distorted_distortion}"
+ return f"{output_path}/{defect_species}/{distorted_distortion}"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
if isinstance(distorted_distortion, str): | |
return f"{output_path}/{defect_species}/{distorted_distortion}" | |
else: | |
return ( | |
f"{output_path}/{defect_species}/Bond_Distortion_" | |
f"{round(distorted_distortion * 100, 1) + 0}%_from_{formatted_distorted_charge}" | |
) | |
return f"{output_path}/{defect_species}/{distorted_distortion}" |
self.assertIn( | ||
"Defect charge states will be set to the range: 0 – {Defect oxidation " | ||
"Defect charge states will be set to the range: 0 - {Defect oxidation " | ||
"state}, with a `padding = 4` on either side of this range.", | ||
result.output, | ||
) |
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.
Convert unittest-style assertion to a regular assert
statement for consistency.
- self.assertIn(
- "Defect charge states will be set to the range: 0 - {Defect oxidation state}, with a `padding = 4` on either side of this range.",
- result.output
- )
+ assert "Defect charge states will be set to the range: 0 - {Defect oxidation state}, with a `padding = 4` on either side of this range." in result.output
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertIn( | |
"Defect charge states will be set to the range: 0 – {Defect oxidation " | |
"Defect charge states will be set to the range: 0 - {Defect oxidation " | |
"state}, with a `padding = 4` on either side of this range.", | |
result.output, | |
) | |
assert "Defect charge states will be set to the range: 0 - {Defect oxidation state}, with a `padding = 4` on either side of this range." in result.output |
self.assertIn( | ||
f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ", | ||
result.output, | ||
) | ||
else: | ||
self.assertNotIn( | ||
f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ", | ||
result.output, | ||
) | ||
energies = loadfn(f"{self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml") | ||
test_energies = { | ||
"distortions": { | ||
-0.4: -1176.28458753, | ||
}, | ||
"Unperturbed": -1173.02056574, | ||
} # Using dictionary here (rather than file/string), because parsing order | ||
# is difference on GitHub actions | ||
self.assertEqual(test_energies, energies) |
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.
Convert unittest-style assertions to regular assert
statements for consistency.
- self.assertIn(
- f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ",
- result.output
- )
- self.assertNotIn(
- f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ",
- result.output
- )
- self.assertEqual(test_energies, energies)
+ assert f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to " in result.output
+ assert f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to " not in result.output
+ assert test_energies == energies
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertIn( | |
f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ", | |
result.output, | |
) | |
else: | |
self.assertNotIn( | |
f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to ", | |
result.output, | |
) | |
energies = loadfn(f"{self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml") | |
test_energies = { | |
"distortions": { | |
-0.4: -1176.28458753, | |
}, | |
"Unperturbed": -1173.02056574, | |
} # Using dictionary here (rather than file/string), because parsing order | |
# is difference on GitHub actions | |
self.assertEqual(test_energies, energies) | |
assert f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to " in result.output | |
else: | |
assert f"Moving old {self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml to " not in result.output | |
energies = loadfn(f"{self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml") | |
test_energies = { | |
"distortions": { | |
-0.4: -1176.28458753, | |
}, | |
"Unperturbed": -1173.02056574, | |
} # Using dictionary here (rather than file/string), because parsing order | |
# is difference on GitHub actions | |
assert test_energies == energies |
for fname in os.listdir("./"): | ||
if fname.endswith("json"): # distortion_metadata and parsed_defects_dict | ||
os.remove(f"./{fname}") | ||
if fname.endswith("json") or fname.endswith("png"): | ||
os.remove(f"./{fname}") # distortion_metadata, parsed_defects_dict, left-over plots |
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.
Optimize the endswith
method call to check multiple conditions in a single call.
- if fname.endswith("json") or fname.endswith("png"):
+ if fname.endswith(("json", "png")):
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
for fname in os.listdir("./"): | |
if fname.endswith("json"): # distortion_metadata and parsed_defects_dict | |
os.remove(f"./{fname}") | |
if fname.endswith("json") or fname.endswith("png"): | |
os.remove(f"./{fname}") # distortion_metadata, parsed_defects_dict, left-over plots | |
for fname in os.listdir("./"): | |
if fname.endswith(("json", "png")): | |
os.remove(f"./{fname}") # distortion_metadata, parsed_defects_dict, left-over plots |
@@ -1077,12 +1076,11 @@ def test_create_vasp_input(self): | |||
"vac_1_Cd_0/Bond_Distortion_-50.0%" | |||
) | |||
kpoints = Kpoints.from_file("vac_1_Cd_0/Bond_Distortion_-50.0%/KPOINTS") | |||
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) | |||
self.assertEqual(kpoints.kpts, [(1, 1, 1)]) |
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.
Use a regular assert
instead of unittest
-style assertEqual
for a more Pythonic approach.
- self.assertEqual(kpoints.kpts, [(1, 1, 1)])
+ assert kpoints.kpts == [(1, 1, 1)]
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertEqual(kpoints.kpts, [(1, 1, 1)]) | |
assert kpoints.kpts == [(1, 1, 1)] |
@@ -1649,12 +1640,9 @@ def test_write_vasp_files(self): | |||
) # default | |||
self.assertEqual(V_Cd_POSCAR.structure, self.V_Cd_minus0pt5_struc_rattled) | |||
kpoints = Kpoints.from_file(f"{V_Cd_Bond_Distortion_folder}/KPOINTS") | |||
self.assertEqual(kpoints.kpts, [[1, 1, 1]]) | |||
self.assertEqual(kpoints.kpts, [(1, 1, 1)]) |
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.
Use a regular assert
instead of unittest
-style assertEqual
for a more Pythonic approach.
- self.assertEqual(kpoints.kpts, [(1, 1, 1)])
+ assert kpoints.kpts == [(1, 1, 1)]
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
self.assertEqual(kpoints.kpts, [(1, 1, 1)]) | |
assert kpoints.kpts == [(1, 1, 1)] |
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.
Actionable comments posted: 2
Out of diff range and nitpick comments (4)
docs/conf.py (4)
Line range hint
72-72
: Use double quotes for consistency.- nb_render_image_options = {"height": "300",} # Reduce plots size + nb_render_image_options = {"height": "300"} # Reduce plots size
Line range hint
131-131
: Missing docstring in public function.Add a docstring to describe the purpose and usage of the
setup
function.def setup(app): + """ + Configure the Sphinx application. + + Args: + app: The Sphinx application object. + """
Line range hint
132-132
: Use double quotes for consistency.- app.add_config_value('myst_parser_config', { + app.add_config_value("myst_parser_config", {
Line range hint
134-134
: Use double quotes for consistency.- 'auto_toc_tree_section': 'Contents', + "auto_toc_tree_section": "Contents",
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- CHANGELOG.rst (1 hunks)
- docs/conf.py (1 hunks)
- setup.py (5 hunks)
Files skipped from review due to trivial changes (1)
- setup.py
Additional Context Used
Ruff (31)
docs/conf.py (31)
1-1: Missing docstring in public module
18-18: Single quotes found but double quotes preferred
23-23: Single quotes found but double quotes preferred
24-24: Single quotes found but double quotes preferred
25-25: Single quotes found but double quotes preferred
28-28: Single quotes found but double quotes preferred
37-37: Single quotes found but double quotes preferred
38-38: Single quotes found but double quotes preferred
39-39: Single quotes found but double quotes preferred
40-40: Single quotes found but double quotes preferred
41-41: Single quotes found but double quotes preferred
42-42: Single quotes found but double quotes preferred
43-43: Single quotes found but double quotes preferred
44-44: Single quotes found but double quotes preferred
46-46: Single quotes found but double quotes preferred
51-51: Single quotes found but double quotes preferred
51-51: Single quotes found but double quotes preferred
52-52: Single quotes found but double quotes preferred
52-52: Single quotes found but double quotes preferred
56-56: Single quotes found but double quotes preferred
61-61: Single quotes found but double quotes preferred
61-61: Single quotes found but double quotes preferred
61-61: Single quotes found but double quotes preferred
72-72: Single quotes found but double quotes preferred
82-82: Single quotes found but double quotes preferred
130-130: Single quotes found but double quotes preferred
131-131: Missing docstring in public function
132-132: Single quotes found but double quotes preferred
133-133: Single quotes found but double quotes preferred
134-134: Single quotes found but double quotes preferred
134-134: Single quotes found but double quotes preferred
@@ -25,7 +25,7 @@ | |||
author = 'Irea Mosquera-Lois, Seán R. Kavanagh' | |||
|
|||
# The full version, including alpha/beta/rc tags | |||
release = '3.3.1' | |||
release = '3.3.3' |
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.
Use double quotes for consistency.
- release = '3.3.3'
+ release = "3.3.3"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
release = '3.3.3' | |
release = "3.3.3" |
v3.3.3 | ||
---------- | ||
- Add ``verbose`` option to more parsing/plotting functions for better control of output detail. | ||
- Improve effiency & robustness of oxidation state handling. | ||
- Miscellaneous efficiency (e.g. memory reduction) and robustness updates. | ||
- Improved GitHub Actions test efficiency. | ||
|
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.
Ensure consistency in the changelog format.
Consider adding a period at the end of each bullet point for consistency.
- - Add ``verbose`` option to more parsing/plotting functions for better control of output detail.
- - Improve effiency & robustness of oxidation state handling.
- - Miscellaneous efficiency (e.g. memory reduction) and robustness updates.
- - Improved GitHub Actions test efficiency.
+ - Add ``verbose`` option to more parsing/plotting functions for better control of output detail.
+ - Improve efficiency & robustness of oxidation state handling.
+ - Miscellaneous efficiency (e.g. memory reduction) and robustness updates.
+ - Improved GitHub Actions test efficiency.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
v3.3.3 | |
---------- | |
- Add ``verbose`` option to more parsing/plotting functions for better control of output detail. | |
- Improve effiency & robustness of oxidation state handling. | |
- Miscellaneous efficiency (e.g. memory reduction) and robustness updates. | |
- Improved GitHub Actions test efficiency. | |
v3.3.3 | |
---------- | |
- Add ``verbose`` option to more parsing/plotting functions for better control of output detail. | |
- Improve efficiency & robustness of oxidation state handling. | |
- Miscellaneous efficiency (e.g. memory reduction) and robustness updates. | |
- Improved GitHub Actions test efficiency. |
Summary by CodeRabbit
New Features
verbose
option to various functions for enhanced output detail.Bug Fixes
apply_dimer_distortion
function to ensure specific operations sequence.Documentation
Refactor
verbose
parameter for conditional output.Tests
Chores