Skip to content

Commit

Permalink
formatting, .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
adriank committed Nov 24, 2018
1 parent 87a9373 commit 7f720a8
Show file tree
Hide file tree
Showing 15 changed files with 2,458 additions and 2,006 deletions.
115 changes: 115 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
47 changes: 28 additions & 19 deletions objectpath/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,42 @@
from types import GeneratorType as generator
from itertools import chain

SELECTOR_OPS=["is",">","<","is not",">=","<=","in","not in",":","and","or","fn"]
SELECTOR_OPS = [
"is", ">", "<", "is not", ">=", "<=", "in", "not in", ":", "and", "or",
"fn"
]
# it must be list because of further concatenations
NUM_TYPES=[int,float]
NUM_TYPES = [int, float]

try: NUM_TYPES+=[long]
except NameError: pass
try:
NUM_TYPES += [long]
except NameError:
pass

STR_TYPES=[str]
STR_TYPES = [str]

try: STR_TYPES+=[unicode]
except NameError: pass
try:
STR_TYPES += [unicode]
except NameError:
pass

ITER_TYPES=[list,generator,chain]
ITER_TYPES = [list, generator, chain]

try: ITER_TYPES+=[map, filter]
except NameError: pass
try:
ITER_TYPES += [map, filter]
except NameError:
pass

class ProgrammingError(Exception):
pass
pass

class ExecutionError(Exception):
pass

PY_TYPES_MAP={
"int":"number",
"float":"number",
"str":"string",
"dict":"object",
"list":"array"
pass

PY_TYPES_MAP = {
"int": "number",
"float": "number",
"str": "string",
"dict": "object",
"list": "array"
}
Loading

0 comments on commit 7f720a8

Please sign in to comment.