Skip to content

Commit

Permalink
Rename the project to abcmeta
Browse files Browse the repository at this point in the history
  • Loading branch information
mortymacs committed Jul 2, 2021
1 parent 96919f6 commit bb1eb22
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ jobs:
python -m pip install flake8 pylint black
- name: Syntax check
run: |
python -m py_compile abcmethod/__init__.py
python -m py_compile abcmeta/__init__.py
- name: Lint with flake8
run: |
flake8 abcmethod/
flake8 abcmeta/
- name: Lint with black
run: |
black -C abcmethod/
black -C abcmeta/
- name: Lint with pylint
run: |
pylint abcmethod/
pylint abcmeta/
- name: Test
run: |
python test.py
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
abcmethod - Python abstract method library with restrictions.
abcmeta - Python meta class and abstract method library with restrictions.

Copyright 2021 Kopano and its licensors

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# abcmethod
# abcmeta

Python abstract method library with restrictions.
Python meta class and abstract method library with restrictions.

This library provides a restricted way to validate abstract methods.
The Python's default abstract method library only validates the methods
Expand All @@ -16,17 +16,17 @@ It works on both annotations and without annotations methods.
You can install the package by `pip`:

```bash
$ pip install abcmethod
$ pip install abcmeta
```

> Note: abcmethod supports Python3.6+.
> Note: abcmeta supports Python3.6+.
### Quick start

```python
from typing import Dict, Text

from abcmethod import ABCMeta, abstractmethod
from abcmeta import ABCMeta, abstractmethod


class Base(ABCMeta):
Expand Down Expand Up @@ -62,7 +62,7 @@ Traceback (most recent call last):
class Drived(Base):
File "/usr/lib/python3.9/abc.py", line 85, in __new__
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
File "/abcmethod/__init__.py", line 179, in __init_subclass__
File "/abcmeta/__init__.py", line 179, in __init_subclass__
raise AttributeError(
AttributeError: Signature of the derived method is not the same as parent class:
- method_2(self, name: str, age: int) -> Dict[str, str]
Expand Down Expand Up @@ -90,7 +90,7 @@ Traceback (most recent call last):
class Drived(Base):
File "/usr/lib/python3.9/abc.py", line 85, in __new__
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
File "/abcmethod/__init__.py", line 180, in __init_subclass__
File "/abcmeta/__init__.py", line 180, in __init_subclass__
raise AttributeError(
AttributeError: Signature of the derived method is not the same as parent class:
- method_2(self, name: str, age: int) -> Dict[str, str]
Expand All @@ -102,7 +102,7 @@ Derived method expected to get name paramter, but gets username

### Issue

If you're faced with a problem, please file an [issue](https://github.com/mortymacs/abcmethod/issues/new) on Github.
If you're faced with a problem, please file an [issue](https://github.com/mortymacs/abcmeta/issues/new) on Github.


### Contribute
Expand Down
2 changes: 1 addition & 1 deletion abcmethod/__init__.py → abcmeta/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Abstract method.
"""ABCMeta library implementation.
This library provides a restricted way to validate abstract methods.
The Python's default abstract method library only validates the methods
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
long_description = f.read()

setup(
name="abcmethod",
name="abcmeta",
version="1.0.0",
author="Morteza NourelahiAlamdari",
author_email="m@0t1.me",
description="Python abstract method library with restrictions.",
description="Python meta class and abstract method library with restrictions.",
long_description=long_description,
long_description_content_type="text/markdown",
license="AGPLv3",
url="https://github.com/mortymacs/abcmethod",
project_urls={"Bug Tracker": "https://github.com/mortymacs/abcmethod/issues"},
url="https://github.com/mortymacs/abcmeta",
project_urls={"Bug Tracker": "https://github.com/mortymacs/abcmeta/issues"},
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
Expand Down
4 changes: 2 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Unit test for abcmethod library."""
"""Unit test for abcmeta library."""
from typing import Dict, Text, Tuple

from abcmethod import ABCMeta, abstractmethod
from abcmeta import ABCMeta, abstractmethod


class Parent(ABCMeta):
Expand Down

0 comments on commit bb1eb22

Please sign in to comment.