update(git|gitignore): add venv to gitignore
This commit is contained in:
parent
d5afdcc60b
commit
348a78e4b3
7 changed files with 141 additions and 11 deletions
133
.gitignore
vendored
133
.gitignore
vendored
|
@ -10,4 +10,135 @@ private.py
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
#other
|
#other
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
|
|
||||||
|
# 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/
|
||||||
|
pip-wheel-metadata/
|
||||||
|
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
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# 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/
|
||||||
|
|
8
bot.py
8
bot.py
|
@ -23,11 +23,11 @@ build = git.Repo(search_parent_directories=True).head.object.hexsha
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
l_extensions: List[str] = [
|
l_extensions: List[str] = [
|
||||||
# 'cogs.admin',
|
'cogs.admin',
|
||||||
'cogs.basics',
|
'cogs.basics',
|
||||||
# 'cogs.utility',
|
'cogs.utility',
|
||||||
# 'cogs.logs',
|
'cogs.logs',
|
||||||
# 'cogs.poll',
|
'cogs.poll',
|
||||||
'jishaku',
|
'jishaku',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Config:
|
||||||
return item in self._db
|
return item in self._db
|
||||||
|
|
||||||
def __getitem__(self, item):
|
def __getitem__(self, item):
|
||||||
return self._db[str(item)]
|
return self._db[item]
|
||||||
|
|
||||||
def all(self) -> list:
|
def all(self) -> list:
|
||||||
return self._db.sections()
|
return self._db.sections()
|
||||||
|
|
|
@ -3,4 +3,4 @@ Base = declarative_base()
|
||||||
|
|
||||||
from .lang import Lang
|
from .lang import Lang
|
||||||
from .warn import Warn
|
from .warn import Warn
|
||||||
# from .poll import Poll, Responses
|
from .poll import Poll, Responses
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
from . import Base
|
||||||
from sqlalchemy import Column, Integer, BigInteger, JSON, ForeignKey, Boolean
|
from sqlalchemy import Column, Integer, BigInteger, JSON, ForeignKey, Boolean
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
from werkzeug.security import generate_password_hash, check_password_hash
|
from werkzeug.security import generate_password_hash, check_password_hash
|
||||||
|
|
||||||
Base = declarative_base()
|
|
||||||
|
|
||||||
|
|
||||||
class Poll(Base):
|
class Poll(Base):
|
||||||
__tablename__ = 'polls'
|
__tablename__ = 'polls'
|
||||||
|
|
|
@ -2,6 +2,6 @@ from cogs.utils.models import *
|
||||||
from cogs.utils.config import Config
|
from cogs.utils.config import Config
|
||||||
from cogs.utils.database import Database
|
from cogs.utils.database import Database
|
||||||
|
|
||||||
database = Database(Config("config.cfg"))
|
database = Database(Config("./configs/config.cfg"))
|
||||||
|
|
||||||
Base.metadata.create_all(database.engine)
|
Base.metadata.create_all(database.engine)
|
||||||
|
|
|
@ -7,3 +7,4 @@ configparser
|
||||||
psutil
|
psutil
|
||||||
tcp_latency
|
tcp_latency
|
||||||
i18n
|
i18n
|
||||||
|
werkzeug
|
Loading…
Reference in a new issue