Skip to content

Commit

Permalink
refactor: changed code to be compliant with black
Browse files Browse the repository at this point in the history
Major code change affecting the way the code is formatted.
New year, 2024!
  • Loading branch information
joamag committed Jan 4, 2024
1 parent cc555cd commit a6fd006
Show file tree
Hide file tree
Showing 82 changed files with 3,385 additions and 4,233 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ easypay.shelve*

/.vscode/settings.json

/.venv

/dist
/build
/src/budy.egg-info
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

*
* Made code compliant with black

### Fixed

Expand Down
54 changes: 25 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# Hive Budy
# Copyright (c) 2008-2020 Hive Solutions Lda.
# Copyright (c) 2008-2024 Hive Solutions Lda.
#
# This file is part of Hive Budy.
#
Expand All @@ -22,7 +22,7 @@
__author__ = "João Magalhães <[email protected]>"
""" The author(s) of the module """

__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda."
__copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda."
""" The copyright for the module """

__license__ = "Apache License, Version 2.0"
Expand All @@ -32,41 +32,35 @@
import setuptools

setuptools.setup(
name = "budy",
version = "0.8.10",
author = "Hive Solutions Lda.",
author_email = "[email protected]",
description = "Budy E-commerce System",
license = "Apache License, Version 2.0",
keywords = "budy e-commerce engine web json",
url = "http://budy.hive.pt",
zip_safe = False,
packages = [
name="budy",
version="0.8.10",
author="Hive Solutions Lda.",
author_email="[email protected]",
description="Budy E-commerce System",
license="Apache License, Version 2.0",
keywords="budy e-commerce engine web json",
url="http://budy.hive.pt",
zip_safe=False,
packages=[
"budy",
"budy.controllers",
"budy.controllers.api",
"budy.controllers.web",
"budy.models",
"budy.test"
"budy.test",
],
test_suite = "budy.test",
package_dir = {
"" : os.path.normpath("src")
},
package_data = {
"budy" : [
test_suite="budy.test",
package_dir={"": os.path.normpath("src")},
package_data={
"budy": [
"static/js/*.js",
"templates/*.tpl",
"templates/order/*.tpl",
"templates/partials/*.tpl"
"templates/partials/*.tpl",
]
},
install_requires = [
"appier",
"appier-extras",
"commons-py"
],
classifiers = [
install_requires=["appier", "appier-extras", "commons-py"],
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Utilities",
"License :: OSI Approved :: Apache Software License",
Expand All @@ -81,8 +75,10 @@
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7"
"Programming Language :: Python :: 3.7",
],
long_description = open(os.path.join(os.path.dirname(__file__), "README.md"), "rb").read().decode("utf-8"),
long_description_content_type = "text/markdown"
long_description=open(os.path.join(os.path.dirname(__file__), "README.md"), "rb")
.read()
.decode("utf-8"),
long_description_content_type="text/markdown",
)
4 changes: 2 additions & 2 deletions src/budy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# Hive Budy
# Copyright (c) 2008-2020 Hive Solutions Lda.
# Copyright (c) 2008-2024 Hive Solutions Lda.
#
# This file is part of Hive Budy.
#
Expand All @@ -19,7 +19,7 @@
# You should have received a copy of the Apache License along with
# Hive Budy. If not, see <http://www.apache.org/licenses/>.

__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda."
__copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda."
""" The copyright for the module """

__license__ = "Apache License, Version 2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/budy/bots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# Hive Budy
# Copyright (c) 2008-2020 Hive Solutions Lda.
# Copyright (c) 2008-2024 Hive Solutions Lda.
#
# This file is part of Hive Budy.
#
Expand All @@ -19,7 +19,7 @@
# You should have received a copy of the Apache License along with
# Hive Budy. If not, see <http://www.apache.org/licenses/>.

__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda."
__copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda."
""" The copyright for the module """

__license__ = "Apache License, Version 2.0"
Expand Down
12 changes: 7 additions & 5 deletions src/budy/bots/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

# Hive Budy
# Copyright (c) 2008-2020 Hive Solutions Lda.
# Copyright (c) 2008-2024 Hive Solutions Lda.
#
# This file is part of Hive Budy.
#
Expand All @@ -22,20 +22,22 @@
__author__ = "João Magalhães <[email protected]>"
""" The author(s) of the module """

__copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda."
__copyright__ = "Copyright (c) 2008-2024 Hive Solutions Lda."
""" The copyright for the module """

__license__ = "Apache License, Version 2.0"
""" The license for the module """

import logging

class Bot(object):

class Bot(object):
def __init__(self, *args, **kwargs):
self.owner = kwargs.get("owner", None)

@property
def logger(self):
if self.owner: return self.owner.logger
else: return logging.getLogger()
if self.owner:
return self.owner.logger
else:
return logging.getLogger()
Loading

0 comments on commit a6fd006

Please sign in to comment.