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

Momchil/various #190

Merged
merged 5 commits into from
Jan 31, 2022
Merged

Momchil/various #190

merged 5 commits into from
Jan 31, 2022

Conversation

momchil-flex
Copy link
Collaborator

No description provided.

@@ -253,7 +253,6 @@ def generate_docstring(cls) -> str:
# if the model already has a docstring, get the first lines and save the rest
original_docstrings = []
if cls.__doc__:
original_docstring = cls.__doc__.replace(" ", "\t")
Copy link
Collaborator

Choose a reason for hiding this comment

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

hm. so does this fix something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Was an unused variable caught by pylint

@@ -848,7 +848,8 @@ def at_centers(self, field_monitor_name: str) -> xr.Dataset:

@equal_aspect
@add_ax_if_none
def plot_field( # pylint:disable=too-many-arguments, too-many-locals
# pylint:disable=too-many-arguments, too-many-locals, too-many-branches, too-many-statements
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup, summarizes how I feel about this method :D

@@ -913,8 +914,8 @@ def plot_field( # pylint:disable=too-many-arguments, too-many-locals
if field_name == "int":
monitor_data = self.at_centers(field_monitor_name)
xr_data = 0.0
for field_name in ("Ex", "Ey", "Ez"):
field_data = monitor_data[field_name]
for field in ("Ex", "Ey", "Ez"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

good call

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

again, pylint caught that :)

try:
import matplotlib as mpl
from mpl_toolkits.axes_grid1 import make_axes_locatable
except Exception: # pylint: disable=broad-except
Copy link
Collaborator

Choose a reason for hiding this comment

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

hm, this is probably not great practice. do you think eventually we can find a solution?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, eventually...

@tylerflex tylerflex merged commit ce246ed into develop Jan 31, 2022
@momchil-flex momchil-flex deleted the momchil/various branch January 31, 2022 23:30
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.

2 participants