Modernize some Python constructs (#876)

* Update __future__ import, remove __metaclass__ assignment.

* Removing obsolete encoding comment.

* Remove unneccessary object inheritance.
This commit is contained in:
Felix Fontein
2025-05-01 10:36:59 +02:00
committed by GitHub
parent 266082db72
commit d8f838c365
133 changed files with 220 additions and 860 deletions

View File

@@ -1,14 +1,9 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, Felix Fontein <felix@fontein.de>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from __future__ import annotations
DOCUMENTATION = r"""
@@ -164,7 +159,7 @@ except ImportError:
HAS_CRYPTOGRAPHY = False
class Certificate(object):
class Certificate:
"""
Stores PEM with parsed certificate.
"""
@@ -275,7 +270,7 @@ def load_PEM_list(module, path, fail_on_error=True):
return []
class CertificateSet(object):
class CertificateSet:
"""
Stores a set of certificates. Allows to search for parent (issuer of a certificate).
"""