Skip to content

Commit

Permalink
Merge branch 'main' into invoice-report
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Mar 7, 2024
2 parents 3b6234b + 1bb0901 commit e825ea5
Show file tree
Hide file tree
Showing 54 changed files with 894 additions and 1,026 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ boxoffice/static/build
.pytest_cache
boxoffice/static/img/fa5-packed.svg
monkeytype.sqlite3

.env
.env.testing
.envrc
23 changes: 11 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.278
rev: v0.3.0
hooks:
- id: ruff
args: ['--fix', '--exit-non-zero-on-fix']
Expand All @@ -20,11 +20,10 @@ repos:
'--remove-duplicate-keys',
]
- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
rev: v3.15.1
hooks:
- id: pyupgrade
args:
['--keep-runtime-typing', '--py3-plus', '--py36-plus', '--py37-plus']
args: ['--keep-runtime-typing', '--py311-plus']
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
Expand All @@ -47,17 +46,17 @@ repos:
- toml
- tomli
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
additional_dependencies:
- toml
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -84,7 +83,7 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.8.0
hooks:
- id: mypy
# warn-unused-ignores is unsafe with pre-commit, see
Expand All @@ -101,12 +100,12 @@ repos:
- types-setuptools
- typing-extensions
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: *flake8deps
- repo: https://github.com/PyCQA/pylint
rev: v3.0.0a6
rev: v3.1.0
hooks:
- id: pylint
args: [
Expand All @@ -118,15 +117,15 @@ repos:
additional_dependencies:
- tomli
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
rev: 1.7.7
hooks:
- id: bandit
language_version: python3
args: ['-c', 'pyproject.toml']
additional_dependencies:
- 'bandit[toml]'
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args: ['--single-quote', '--trailing-comma', 'es5']
Expand Down
19 changes: 0 additions & 19 deletions boxoffice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from typing import Any

from flask import Flask
from flask_admin import Admin
from flask_mail import Mail
from flask_migrate import Migrate
from flask_rq2 import RQ
Expand Down Expand Up @@ -46,11 +45,6 @@
User,
db,
)
from .siteadmin import ( # isort:skip
DiscountCouponModelView,
InvoiceModelView,
OrganizationModelView,
)

# --- Handle JSON quirk for Boxoffice --------------------------------------------------

Expand Down Expand Up @@ -91,16 +85,3 @@ def default(o: Any) -> Any:
app.jinja_env.policies['json.dumps_function'] = app.json.dumps

mail.init_app(app)


# This is a temporary solution for an admin interface, only
# to be used until the native admin interface is ready.
try:
admin = Admin(
app, name="Boxoffice Admin", template_mode='bootstrap3', url='/siteadmin'
)
admin.add_view(OrganizationModelView(Organization, db.session))
admin.add_view(DiscountCouponModelView(DiscountCoupon, db.session))
admin.add_view(InvoiceModelView(Invoice, db.session))
except AssertionError:
pass
48 changes: 24 additions & 24 deletions boxoffice/assets/js/libs/bootstrap.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ if ('undefined' == typeof jQuery)
'number' == typeof b
? e.to(b)
: g
? e[g]()
: f.interval && e.pause().cycle();
? e[g]()
: f.interval && e.pause().cycle();
});
}
var c = function (b, c) {
Expand Down Expand Up @@ -270,12 +270,12 @@ if ('undefined' == typeof jQuery)
return a > this.$items.length - 1 || 0 > a
? void 0
: this.sliding
? this.$element.one('slid.bs.carousel', function () {
b.to(a);
})
: c == a
? this.pause().cycle()
: this.slide(a > c ? 'next' : 'prev', this.$items.eq(a));
? this.$element.one('slid.bs.carousel', function () {
b.to(a);
})
: c == a
? this.pause().cycle()
: this.slide(a > c ? 'next' : 'prev', this.$items.eq(a));
}),
(c.prototype.pause = function (b) {
return (
Expand Down Expand Up @@ -1100,12 +1100,12 @@ if ('undefined' == typeof jQuery)
'bottom' == h && k.bottom + m > o.bottom
? 'top'
: 'top' == h && k.top - m < o.top
? 'bottom'
: 'right' == h && k.right + l > o.width
? 'left'
: 'left' == h && k.left - l < o.left
? 'right'
: h),
? 'bottom'
: 'right' == h && k.right + l > o.width
? 'left'
: 'left' == h && k.left - l < o.left
? 'right'
: h),
f.removeClass(n).addClass(h);
}
var p = this.getCalculatedOffset(h, k, l, m);
Expand Down Expand Up @@ -1227,10 +1227,10 @@ if ('undefined' == typeof jQuery)
return 'bottom' == a
? { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 }
: 'top' == a
? { top: b.top - d, left: b.left + b.width / 2 - c / 2 }
: 'left' == a
? { top: b.top + b.height / 2 - d / 2, left: b.left - c }
: { top: b.top + b.height / 2 - d / 2, left: b.left + b.width };
? { top: b.top - d, left: b.left + b.width / 2 - c / 2 }
: 'left' == a
? { top: b.top + b.height / 2 - d / 2, left: b.left - c }
: { top: b.top + b.height / 2 - d / 2, left: b.left + b.width };
}),
(c.prototype.getViewportAdjustedDelta = function (a, b, c, d) {
var e = { top: 0, left: 0 };
Expand Down Expand Up @@ -1302,8 +1302,8 @@ if ('undefined' == typeof jQuery)
? ((c.inState.click = !c.inState.click),
c.isInStateTrue() ? c.enter(c) : c.leave(c))
: c.tip().hasClass('in')
? c.leave(c)
: c.enter(c);
? c.leave(c)
: c.enter(c);
}),
(c.prototype.destroy = function () {
var a = this;
Expand Down Expand Up @@ -1637,16 +1637,16 @@ if ('undefined' == typeof jQuery)
? !1
: 'bottom'
: a - d >= e + g
? !1
: 'bottom';
? !1
: 'bottom';
var h = null == this.affixed,
i = h ? e : f.top,
j = h ? g : b;
return null != c && c >= e
? 'top'
: null != d && i + j >= a - d
? 'bottom'
: !1;
? 'bottom'
: !1;
}),
(c.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset;
Expand Down
Loading

0 comments on commit e825ea5

Please sign in to comment.