Skip to content

Commit 9162046

Browse files
committed
fix setup to underscores
1 parent 4c6ba2d commit 9162046

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
<p>
2+
<a href="https://pypi.org/project/sqlalchemy-to-ormar">
3+
<img src="https://img.shields.io/pypi/v/sqlalchemy-to-ormar.svg" alt="Pypi version">
4+
</a>
5+
<a href="https://pypi.org/project/sqlalchemy-to-ormar">
6+
<img src="https://img.shields.io/pypi/pyversions/sqlalchemy-to-ormar.svg" alt="Pypi version">
7+
</a>
8+
<img src="https://github.com/collerek/sqlalchemy-to-ormar/workflows/build/badge.svg" alt="Build Status">
9+
<a href="https://codeclimate.com/github/collerek/sqlalchemy-to-ormar/maintainability"><img src="https://api.codeclimate.com/v1/badges/e3ce9277f8373d22afb9/maintainability" /></a>
10+
<a href="https://codecov.io/gh/collerek/sqlalchemy-to-ormar">
11+
<img src="https://codecov.io/gh/collerek/sqlalchemy-to-ormar/branch/main/graph/badge.svg?token=1FPH7A4Z8P"/>
12+
</a>
13+
<a href="https://codeclimate.com/github/collerek/sqlalchemy-to-ormar/test_coverage"><img src="https://api.codeclimate.com/v1/badges/e3ce9277f8373d22afb9/test_coverage" /></a>
14+
<a href="https://pepy.tech/project/sqlalchemy-to-ormar">
15+
<img src="https://pepy.tech/badge/sqlalchemy-to-ormar"></a>
16+
</p>
17+
118
# sqlalchemy-to-ormar
219

320
A simple auto-translator from `sqlalchemy` ORM models to `ormar` models.

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def get_version(package):
1414
"""
1515
Return package version as listed in `__version__` in `init.py`.
1616
"""
17+
package = package.replace("-", "_")
1718
with open(os.path.join(package, "__init__.py")) as f:
1819
return re.search("__version__ = ['\"]([^'\"]+)['\"]", f.read()).group(1)
1920

@@ -30,6 +31,7 @@ def get_packages(package):
3031
"""
3132
Return root package and all sub-packages.
3233
"""
34+
package = package.replace("-", "_")
3335
return [
3436
dirpath
3537
for dirpath, dirnames, filenames in os.walk(package)

0 commit comments

Comments
 (0)