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
4 changes: 2 additions & 2 deletions devutils/makesdist
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import subprocess
import sys
import tarfile

from setup import FALLBACK_VERSION, versiondata

BASEDIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.insert(0, BASEDIR)

from setup import FALLBACK_VERSION, versiondata

timestamp = versiondata.getint("DEFAULT", "timestamp")

vfb = versiondata.get("DEFAULT", "version").split(".post")[0] + ".post0"
Expand Down
4 changes: 3 additions & 1 deletion doc/manual/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import sys
import time

from setup import versiondata

# 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 os.path.abspath to make it absolute, like shown here.
Expand Down Expand Up @@ -61,7 +63,7 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
sys.path.insert(0, os.path.abspath("../../.."))
from setup import versiondata


fullversion = versiondata.get("DEFAULT", "version")
# The short X.Y version.
Expand Down
18 changes: 5 additions & 13 deletions src/diffpy/srfit/equation/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@
# right-side over its arguments. This results in an array of BaseBuilder
# instances, not an BaseBuilder that contains an array.

_builders = {}


import inspect
import numbers

Expand All @@ -106,6 +103,8 @@
from diffpy.srfit.equation.equationmod import Equation
from diffpy.srfit.equation.literals.literal import Literal

_builders = {}


class EquationFactory(object):
"""A Factory for equations.
Expand Down Expand Up @@ -365,16 +364,9 @@ def _getUndefinedArgs(self, eqstr):
# generated.
for tok in set(args):
# Move genuine varibles to the eqargs dictionary
Copy link
Author

Choose a reason for hiding this comment

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

just cleaning up the syntax ab it.

if (
# Check registered builders
tok in self.builders
or
# Check symbols
tok in EquationFactory.symbols
or
# Check ignored characters
tok in EquationFactory.ignore
):
if (tok in self.builders or # Check registered builders
tok in EquationFactory.symbols or # Check symbols
tok in EquationFactory.ignore): # Check ignored characters
args.remove(tok)

return args
Expand Down