Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address flake8 rst docstring issues #190

Merged
merged 2 commits into from
Mar 10, 2023
Merged

Address flake8 rst docstring issues #190

merged 2 commits into from
Mar 10, 2023

Conversation

eirikurj
Copy link
Contributor

@eirikurj eirikurj commented Mar 9, 2023

Purpose

This PR fixes flake8 RST warnings when flake8-rst-docstrings extension enabled.

Expected time until merged

Once docs build pass

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@eirikurj eirikurj requested a review from a team as a code owner March 9, 2023 16:15
@eirikurj eirikurj requested review from joanibal and anilyil March 9, 2023 16:15
@codecov
Copy link

codecov bot commented Mar 9, 2023

Codecov Report

Merging #190 (3e4e7dc) into main (41ffb0b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #190   +/-   ##
=======================================
  Coverage   64.77%   64.77%           
=======================================
  Files          47       47           
  Lines       11951    11951           
=======================================
  Hits         7741     7741           
  Misses       4210     4210           
Impacted Files Coverage Δ
pygeo/constraints/DVCon.py 71.72% <ø> (ø)
pygeo/parameterization/BaseDVGeo.py 66.66% <ø> (ø)
pygeo/parameterization/DVGeoCST.py 89.34% <ø> (ø)
pygeo/parameterization/DVGeoSketch.py 67.92% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

marcomangano
marcomangano previously approved these changes Mar 9, 2023
pygeo/constraints/DVCon.py Outdated Show resolved Hide resolved
@@ -286,7 +286,7 @@ def addPointSet(self, points, ptName, boundTol=1e-10, **kwargs):
boundTol : float, optional
Small absolute deviation by which the airfoil coordinates can exceed the initial
minimum and maximum x coordinates, by default 1e-10.
kwargs
\*\*kwargs
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would be surprised if backslash is necessary here

Copy link
Contributor Author

@eirikurj eirikurj Mar 10, 2023

Choose a reason for hiding this comment

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

Yes, that was my thought too. However, if removed, the following is generated
RST210 Inline strong start-string without end-string. There is an open issue on this peterjc/flake8-rst-docstrings#18 and some PR, but not sure why its not merged yet. While escaping is ugly, it works and is consistent with rst. Not sure if there is any other approach at the moment, but any suggestions are welcome.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. I guess I'm fine with this then, even though it is harder to read. The alternative would be to ignore RST210 but that may mask other issues.

@marcomangano marcomangano merged commit 1a15f29 into main Mar 10, 2023
@marcomangano marcomangano deleted the fixDocstringRST branch March 10, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants