Fix issues based on linter
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import typing
|
||||
from urllib.parse import urljoin, urlparse, urlunparse
|
||||
|
||||
import typing
|
||||
import user_agents
|
||||
from flask import request, abort
|
||||
from flask_babel import LazyString
|
||||
|
||||
@@ -47,7 +47,6 @@ def get_temp_dir():
|
||||
def clone_repo(urlstr, ref=None, recursive=False):
|
||||
gitDir = os.path.join(tempfile.gettempdir(), randomString(10))
|
||||
|
||||
err = None
|
||||
try:
|
||||
gitUrl = generate_git_url(urlstr)
|
||||
print("Cloning from " + gitUrl)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import typing
|
||||
from functools import wraps
|
||||
from typing import List
|
||||
|
||||
@@ -87,7 +87,8 @@ def addNotification(target, causer: User, type: NotificationType, title: str, ur
|
||||
db.session.add(notif)
|
||||
|
||||
|
||||
def addAuditLog(severity: AuditSeverity, causer: User, title: str, url: str, package : Package =None, description : str =None):
|
||||
def addAuditLog(severity: AuditSeverity, causer: User, title: str, url: typing.Optional[str],
|
||||
package: Package = None, description: str = None):
|
||||
entry = AuditLogEntry(causer, severity, title, url, package, description)
|
||||
db.session.add(entry)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user