forked from petl-developers/petl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed petl-developers#567: Made it possible to customize the numeric …
…types. The current code does not right-align numeric types when converting to text. numeric_types is defined in petl.compat. The following customization (via monkey-patching, yes, I know) does not work, however: import petl.compat petl.compat.numeric_types = petl.compat.numeric_types + (Decimal,) because in petl/util/vis.py it is accessed like this: from petl.compat import numeric_types, text_type and this module gets loaded as a side-effect of importing petl. Changing it to this - everywhere it is used - would fix the issue: from petl import compat ... isinstance(..., compat.numeric_types) ...
- Loading branch information
Showing
3 changed files
with
29 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters