Skip to content

Commit

Permalink
fix code style/lint/black/flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
lcduong committed Oct 10, 2024
1 parent 1a53e72 commit c9d3674
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 111 deletions.
1 change: 0 additions & 1 deletion server/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def _clear_db():


@pytest.fixture(autouse=True)
@pytest.mark.django_db
async def clear_database(request):
if "django_db" not in request.keywords: # pragma: no cover
return
Expand Down
1 change: 0 additions & 1 deletion server/venueless/control/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class WorldAdminToken(AdminBase, DetailView):
success_url = "/control/worlds/"

def get(self, request, *args, **kwargs):
base_path = settings.BASE_PATH
world = self.get_object()
jwt_config = world.config["JWT_secrets"][0]
secret = jwt_config["secret"]
Expand Down
3 changes: 1 addition & 2 deletions server/venueless/storage/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import re
from io import BytesIO

from asgiref.sync import async_to_sync
Expand Down Expand Up @@ -34,7 +33,7 @@ def dispatch(self, request, *args, **kwargs):

@cached_property
def world(self):
world_id = self.kwargs.get('world_id', None)
world_id = self.kwargs.get("world_id", None)
return get_object_or_404(World, id=world_id)

@cached_property
Expand Down
4 changes: 2 additions & 2 deletions webapp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ if (ENV_DEVELOPMENT || !window.venueless) {
const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws'
const httpProtocol = window.location.protocol
// Extract the world name from the URL path
const pathSegments = window.location.pathname.split('/');
const worldName = pathSegments.length > 2 ? pathSegments[2] : 'sample';
const pathSegments = window.location.pathname.split('/')
const worldName = pathSegments.length > 2 ? pathSegments[2] : 'sample'
config = {
api: {
base: `${httpProtocol}//${hostname}:8443/api/v1/worlds/${worldName}/`,
Expand Down
149 changes: 74 additions & 75 deletions webapp/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import ContactRequests from 'views/contact-requests'
import Preferences from 'views/preferences'
import config from 'config'


Vue.use(VueRouter)

const routes = [
Expand Down Expand Up @@ -44,17 +43,17 @@ const routes = [
name: 'standalone:anonymous',
component: () => import(/* webpackChunkName: "standalone" */ 'views/standalone/anonymous')
}]
},
},
{
path: '/rooms/:roomId/presentation/:mode',
redirect(to) {
return {
path: `/standalone/${to.params.roomId}/${to.params.mode}`
}
}
},
},
{
path: `/:worldName`,
path: '/:worldName',
component: App,
props: true,
children: [
Expand All @@ -68,7 +67,7 @@ const routes = [
name: 'home',
component: Room
}]
},
},
{
path: 'rooms/:roomId',
component: RoomHeader,
Expand All @@ -82,126 +81,126 @@ const routes = [
name: 'room:manage',
component: RoomManager
}]
},
},
{
path: 'channels/:channelId',
name: 'channel',
component: Channel,
props: true
},
},
{
path: 'schedule',
name: 'schedule',
component: Schedule
},
},
{
path: 'schedule/talks/:talkId',
name: 'schedule:talk',
component: Talk,
props: true
},
},
{
path: 'sessions',
name: 'schedule:sessions',
component: Session,
props: true
},
},
{
path: 'schedule/speakers',
name: 'schedule:speakers',
component: Speakers
},
},
{
path: 'schedule/speakers/:speakerId',
name: 'schedule:speaker',
component: Speaker,
props: true
},
},
{
path: 'exhibitors/:exhibitorId',
name: 'exhibitor',
component: Exhibitor,
props: true
},
},
{
path: 'contact-requests',
name: 'contactRequests',
component: ContactRequests,
props: true
},
},
{
path: 'preferences',
name: 'preferences',
component: Preferences
},
},
{
path: 'posters/:posterId',
name: 'poster',
component: () => import(/* webpackChunkName: "posters" */ 'views/posters/item'),
props: true
},
},
{
path: 'manage-exhibitors',
name: 'exhibitors',
component: () => import(/* webpackChunkName: "exhibitors" */ 'views/exhibitor-manager')
},
},
{
path: 'manage-exhibitors/:exhibitorId',
name: 'exhibitors:exhibitor',
component: () => import(/* webpackChunkName: "exhibitors" */ 'views/exhibitor-manager/exhibitor'),
props: true
},
},
{
path: 'manage-posters',
name: 'posters',
component: () => import(/* webpackChunkName: "posters" */ 'views/poster-manager')
},
},
{
path: 'manage-posters/create',
name: 'posters:create-poster',
component: () => import(/* webpackChunkName: "posters" */ 'views/poster-manager/poster'),
props: {
create: true
}
},
},
{
path: 'manage-posters/:posterId',
name: 'posters:poster',
component: () => import(/* webpackChunkName: "posters" */ 'views/poster-manager/poster'),
props: true
},
},
{
path: 'admin',
name: 'admin',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin')
},
},
{
path: 'admin/users',
name: 'admin:users',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/users')
},
},
{
path: 'admin/users/:userId',
name: 'admin:user',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/user'),
props: true
},
},
{
path: 'admin/rooms',
name: 'admin:rooms:index',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/rooms/index')
},
},
{
path: 'admin/rooms/new/:type?',
name: 'admin:rooms:new',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/rooms/new')
},
},
{
path: 'admin/rooms/:roomId',
name: 'admin:rooms:item',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/rooms/item'),
props: true
},
},
{
path: 'admin/announcements',
name: 'admin:announcements',
Expand All @@ -212,71 +211,71 @@ const routes = [
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/announcements/item'),
props: true
}]
},
},
{
path: 'admin/kiosks',
name: 'admin:kiosks:index',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/kiosks/index')
},
},
{
path: 'admin/kiosks/new',
name: 'admin:kiosks:new',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/kiosks/new')
},
},
{
path: 'admin/kiosks/:kioskId',
name: 'admin:kiosks:item',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/kiosks/item'),
props: true
},
},
{
path: 'admin/config',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config'),
children: [{
path: '',
name: 'admin:config',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/main')
},
{
path: 'schedule',
name: 'admin:config:schedule',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/schedule')
},
{
path: 'theme',
name: 'admin:config:theme',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/theme')
},
{
path: 'permissions',
name: 'admin:config:permissions',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/permissions')
},
{
path: 'token-generator',
name: 'admin:config:token-generator',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/token-generator')
},
{
path: 'registration',
name: 'admin:config:registration',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/registration')
},
{
path: 'privacy',
name: 'admin:config:privacy',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/privacy')
},
{
path: 'audit-log',
name: 'admin:config:audit-log',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/audit-log')
},
{
path: 'reports',
name: 'admin:config:reports',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/reports')
}
path: '',
name: 'admin:config',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/main')
},
{
path: 'schedule',
name: 'admin:config:schedule',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/schedule')
},
{
path: 'theme',
name: 'admin:config:theme',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/theme')
},
{
path: 'permissions',
name: 'admin:config:permissions',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/permissions')
},
{
path: 'token-generator',
name: 'admin:config:token-generator',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/token-generator')
},
{
path: 'registration',
name: 'admin:config:registration',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/registration')
},
{
path: 'privacy',
name: 'admin:config:privacy',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/privacy')
},
{
path: 'audit-log',
name: 'admin:config:audit-log',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/audit-log')
},
{
path: 'reports',
name: 'admin:config:reports',
component: () => import(/* webpackChunkName: "admin" */ 'views/admin/config/reports')
}
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/store/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default {
}
})

return Array.from(languageMap).map(([id, name]) => ({ value: id, label: name }));
return Array.from(languageMap).map(([id, name]) => ({ value: id, label: name }))
},
matchesSessionTypeFilter: (state) => (talk, selectedIds) => {
if (typeof talk?.session_type === 'string') {
Expand Down
Loading

0 comments on commit c9d3674

Please sign in to comment.