Skip to content

Commit

Permalink
source code cleanup
Browse files Browse the repository at this point in the history
python2 support dropped
  • Loading branch information
gurneyalex committed May 16, 2023
1 parent 391f1b5 commit aa3cb14
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions anthem/cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright 2016 Camptocamp SA
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html)

from __future__ import print_function

import argparse
import code
@@ -89,7 +88,7 @@ def banner():
return b


class Options(object):
class Options:
def __init__(
self, interactive=False, quiet=False, test_mode=False, odoo_data_path=None
):
@@ -115,7 +114,7 @@ def run(odoo_args, target, options):
ctx.env.cr.commit()


class Context(object):
class Context:
def __init__(self, odoo_args, options):
self.env = self._build_odoo_env(odoo_args)
self.options = options
3 changes: 1 addition & 2 deletions anthem/output.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright 2016 Camptocamp SA
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html)

from __future__ import print_function

import functools
import time
@@ -13,7 +12,7 @@ def safe_print(ustring, errors="replace", **kwargs):
print(ustring, **kwargs)


class LogIndent(object):
class LogIndent:
def __init__(self):
self.level = 0

3 changes: 1 addition & 2 deletions tasks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright 2016 Camptocamp SA
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html)

from __future__ import print_function

import os

@@ -64,7 +63,7 @@ def tests_dropdb(ctx, version):
def tests_prepare_config(ctx, version, source, target):
assert_version(version)
assert source and target
with open(source, "rU") as source_file:
with open(source) as source_file:
config_content = source_file.readlines()

for idx, line in enumerate(config_content):

0 comments on commit aa3cb14

Please sign in to comment.