Skip to content

Commit

Permalink
Update logging calls that were marked in pylint from the pylintrc update
Browse files Browse the repository at this point in the history
  • Loading branch information
abadger committed May 11, 2020
1 parent 11d2a82 commit 4b34ba0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ansibulled/changelog/changelog_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def _collect(self, squash: bool = False, after_version: Optional[str] = None,
for section, lines in fragment.content.items():
if section == self.config.prelude_name:
if entry_fragment:
LOGGER.info('skipping prelude in version %s due to newer '
'prelude in version %s',
LOGGER.info('skipping prelude in version {} due to newer '
'prelude in version {}',
version, entry_version)
continue

Expand Down
4 changes: 2 additions & 2 deletions ansibulled/changelog/changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def add_release(self, version: str, codename: Optional[str], release_date: datet
if codename is not None:
self.releases[version]['codename'] = codename
else:
LOGGER.warning('release %s already exists', version)
LOGGER.warning('release {} already exists', version)

@abc.abstractmethod
def add_fragment(self, fragment: ChangelogFragment, version: str):
Expand Down Expand Up @@ -710,7 +710,7 @@ def add_release(config: ChangelogConfig, # pylint: disable=too-many-arguments
else packaging.version.Version)
version_constructor(version)

LOGGER.info('release version %s is a %s version', version,
LOGGER.info('release version {} is a {} version', version,
'release' if is_release_version(config, version) else 'pre-release')

# filter out plugins which were not added in this release
Expand Down
2 changes: 1 addition & 1 deletion ansibulled/changelog/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def load_plugins(paths: PathsConfig, version: str,
plugins_data = yaml.safe_load(plugin_cache_fd)

if version != plugins_data['version']:
LOGGER.info('version %s does not match plugin cache version %s',
LOGGER.info('version {} does not match plugin cache version {}',
version, plugins_data['version'])
plugins_data = {}

Expand Down
14 changes: 7 additions & 7 deletions ansibulled/cli/ansibulled_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ def command_init(args: Any) -> None:

paths = set_paths(force=root)

LOGGER.debug('Checking "{0}" for existance'.format(paths.galaxy_path))
LOGGER.debug('Checking "{}" for existance', paths.galaxy_path)
if not os.path.exists(cast(str, paths.galaxy_path)):
LOGGER.error('The file galaxy.yml does not exists in the collection root!')
sys.exit(3)
LOGGER.debug('Checking "{0}" for existance'.format(paths.config_path))
LOGGER.debug('Checking "{}" for existance', paths.config_path)
if os.path.exists(paths.config_path):
LOGGER.error('A configuration file already exists at "{0}"!'.format(paths.config_path))
LOGGER.error('A configuration file already exists at "{}"!', paths.config_path)
sys.exit(3)

galaxy = load_galaxy_metadata(paths)
Expand All @@ -158,16 +158,16 @@ def command_init(args: Any) -> None:
os.makedirs(fragments_dir, exist_ok=True)
print('Created fragments directory "{0}"'.format(fragments_dir))
except Exception as e:
LOGGER.error('Cannot create fragments directory "{0}"'.format(fragments_dir))
LOGGER.info('Exception: {0}'.format(str(e)))
LOGGER.error('Cannot create fragments directory "{}"', fragments_dir)
LOGGER.info('Exception: {}', str(e))
sys.exit(3)

try:
config.store(paths.config_path)
print('Created config file "{0}"'.format(paths.config_path))
except Exception as e:
LOGGER.error('Cannot create config file "{0}"'.format(paths.config_path))
LOGGER.info('Exception: {0}'.format(str(e)))
LOGGER.error('Cannot create config file "{}"', paths.config_path)
LOGGER.info('Exception: {}', str(e))
sys.exit(3)


Expand Down

0 comments on commit 4b34ba0

Please sign in to comment.