Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# diffpy.srxplanar documentation build configuration file, created by # noqa: E501
# diffpy.srxplanar documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 30 15:49:41 2014.
#
# This file is execfile()d with the current directory set to its
Expand All @@ -22,11 +22,11 @@
try:
fullversion = version("diffpy.srxplanar")
except Exception:
fullversion = "No version found. The correct version will appear in the released version." # noqa: E501
fullversion = "No version found. The correct version will appear in the released version."

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501
# documentation root, use Path().resolve() to make it absolute, like shown here.
# sys.path.insert(0, str(Path(".").resolve()))
sys.path.insert(0, str(Path("../..").resolve()))
sys.path.insert(0, str(Path("../../src").resolve()))
Expand Down
23 changes: 23 additions & 0 deletions news/remove-noqa.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* No news added: Removed noqa comments

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
13 changes: 3 additions & 10 deletions src/diffpy/srxplanar/selfcalibrate.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
from functools import partial
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The way I changed this file is that I removed the PySide import and just setting rcParams to QtAgg to allow matplotlib to detect the version of pyside to use (PySide6 or PySide2). I also put all of these matplotlib imports inside the try block, as the presence of mplenabled tells me that matplotlib and PySide are optional dependencies and do not necessarily have to be installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbillinge ready for review


import numpy as np
from matplotlib import rcParams
from scipy.optimize import leastsq, minimize

rcParams["backend"] = "Qt4Agg"
try:
import PySide # noqa: F401
from matplotlib import rcParams

rcParams["backend.qt4"] = "PySide"
rcParams["backend"] = "QtAgg"
import matplotlib.pyplot as plt

mplenabled = True
except ImportError:
try:
import matplotlib.pyplot as plt

mplenabled = True
except ImportError:
mplenabled = False
mplenabled = False


def halfcut(
Expand Down
3 changes: 2 additions & 1 deletion src/diffpy/srxplanar/srxplanarconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@


class SrXplanarConfig(ConfigBase):
"""Config class, based on ConfigBase class in diffpy.srxconfutils."""
"""Config class, based on ConfigBase class in
diffpy.srxconfutils."""

# Text to display before the argument help
_description = _description
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/srxplanar/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# File coded by: Xiaohao Yang, Simon Billinge, Billinge Group members.
#
# See GitHub contributions for a more detailed list of contributors.
# https://github.com/diffpy/diffpy.srxplanar/graphs/contributors # noqa: E501
# https://github.com/diffpy/diffpy.srxplanar/graphs/contributors
#
# See LICENSE.rst for license information.
#
Expand Down
Loading