Chore: Linted.

This commit is contained in:
Amritanshu Agrawal 2022-04-17 13:44:56 +05:30
parent d7b06cfdb4
commit ee8cde46b7
26 changed files with 110 additions and 148 deletions

View File

@ -1,5 +1,5 @@
---
http_host: "luthor.tanshu.com"
http_conf: "luthor.tanshu.com.conf"
http_host: "www.anubhachambers.com"
http_conf: "www.anubhachambers.com.conf"
host_port: "8342"
host_directory: "luthor"

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
cd "$parent_path/otis" || exit
npx prettier --write src/
npx prettier --write src/app
npx ng lint --fix
cd "$parent_path/luthor" || exit
isort luthor
black luthor
flake8 luthor
poetry run isort luthor
poetry run black luthor
poetry run flake8 luthor

1
luthor/.gitignore vendored
View File

@ -1,3 +1,4 @@
*.pyc
*/__pycache__/
*.egg-info/
poetry.lock

View File

@ -1,7 +1,5 @@
import uuid
from hashlib import md5
from sqlalchemy import Boolean, Column, Unicode, text
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import Session, relationship, synonym

View File

@ -6,13 +6,11 @@ describe('ActDetailComponent', () => {
let component: ActDetailComponent;
let fixture: ComponentFixture<ActDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ActDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ActDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ActDetailComponent);

View File

@ -6,13 +6,11 @@ describe('AdvocateDetailComponent', () => {
let component: AdvocateDetailComponent;
let fixture: ComponentFixture<AdvocateDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AdvocateDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AdvocateDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AdvocateDetailComponent);

View File

@ -6,13 +6,11 @@ describe('CaseSourceDetailComponent', () => {
let component: CaseSourceDetailComponent;
let fixture: ComponentFixture<CaseSourceDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CaseSourceDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CaseSourceDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CaseSourceDetailComponent);

View File

@ -6,13 +6,11 @@ describe('CaseTypeDetailComponent', () => {
let component: CaseTypeDetailComponent;
let fixture: ComponentFixture<CaseTypeDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CaseTypeDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CaseTypeDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CaseTypeDetailComponent);

View File

@ -6,13 +6,11 @@ describe('CaseDetailComponent', () => {
let component: CaseDetailComponent;
let fixture: ComponentFixture<CaseDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CaseDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CaseDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CaseDetailComponent);

View File

@ -6,13 +6,11 @@ describe('HearingDialogComponent', () => {
let component: HearingDialogComponent;
let fixture: ComponentFixture<HearingDialogComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [HearingDialogComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [HearingDialogComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HearingDialogComponent);

View File

@ -48,7 +48,8 @@ export class CaseListDataSource extends DataSource<Case> {
return this.searchValues.split(' ').reduce(
(p: Case[], c: string) =>
p.filter((x) => {
const accountString = `${x.caseSource.prefix}-${x.officeFileNumber} ${x.courtCaseNumber} ${x.year} ${x.title}
const accountString =
`${x.caseSource.prefix}-${x.officeFileNumber} ${x.courtCaseNumber} ${x.year} ${x.title}
${x.docketNumber} ${x.remarks}`.toLowerCase();
return accountString.indexOf(c) !== -1;
}),

View File

@ -22,13 +22,13 @@ export class CauseListDatasource extends DataSource<Case> {
return merge(...dataMutations)
.pipe(
tap((x: Case[]) => {
tap((x) => {
if (this.paginator) {
this.paginator.length = x.length;
this.paginator.length = this.dataValues.length;
}
}),
)
.pipe(map((x: Case[]) => this.getPagedData(this.dataValues)));
.pipe(map((x) => this.getPagedData(this.dataValues)));
}
disconnect() {}

View File

@ -21,13 +21,13 @@ export class ComplianceListDatasource extends DataSource<ComplianceList> {
return merge(...dataMutations)
.pipe(
tap((x: ComplianceList[]) => {
tap((x) => {
if (this.paginator) {
this.paginator.length = x.length;
this.paginator.length = this.data.length;
}
}),
)
.pipe(map((x: ComplianceList[]) => this.getPagedData(this.data)));
.pipe(map((x) => this.getPagedData(this.data)));
}
disconnect() {}

View File

@ -6,13 +6,11 @@ describe('ContactDetailComponent', () => {
let component: ContactDetailComponent;
let fixture: ComponentFixture<ContactDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ContactDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ContactDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ContactDetailComponent);

View File

@ -6,13 +6,11 @@ describe('CourtStatusDetailComponent', () => {
let component: CourtStatusDetailComponent;
let fixture: ComponentFixture<CourtStatusDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CourtStatusDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CourtStatusDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CourtStatusDetailComponent);

View File

@ -6,13 +6,11 @@ describe('CourtDetailComponent', () => {
let component: CourtDetailComponent;
let fixture: ComponentFixture<CourtDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CourtDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CourtDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CourtDetailComponent);

View File

@ -6,13 +6,11 @@ describe('DepartmentDetailComponent', () => {
let component: DepartmentDetailComponent;
let fixture: ComponentFixture<DepartmentDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DepartmentDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DepartmentDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DepartmentDetailComponent);

View File

@ -6,13 +6,11 @@ describe('DiscountReportComponent', () => {
let component: DiscountReportComponent;
let fixture: ComponentFixture<DiscountReportComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DiscountReportComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DiscountReportComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DiscountReportComponent);

View File

@ -6,13 +6,11 @@ describe('NatureDetailComponent', () => {
let component: NatureDetailComponent;
let fixture: ComponentFixture<NatureDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [NatureDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [NatureDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NatureDetailComponent);

View File

@ -6,13 +6,11 @@ describe('NavBarComponent', () => {
let component: NavBarComponent;
let fixture: ComponentFixture<NavBarComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [NavBarComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [NavBarComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NavBarComponent);

View File

@ -6,13 +6,11 @@ describe('OfficeStatusDetailComponent', () => {
let component: OfficeStatusDetailComponent;
let fixture: ComponentFixture<OfficeStatusDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [OfficeStatusDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [OfficeStatusDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OfficeStatusDetailComponent);

View File

@ -6,13 +6,11 @@ describe('OfficeDetailComponent', () => {
let component: OfficeDetailComponent;
let fixture: ComponentFixture<OfficeDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [OfficeDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [OfficeDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OfficeDetailComponent);

View File

@ -6,13 +6,11 @@ describe('RoleDetailComponent', () => {
let component: RoleDetailComponent;
let fixture: ComponentFixture<RoleDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [RoleDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [RoleDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RoleDetailComponent);

View File

@ -6,13 +6,11 @@ describe('SaleReportComponent', () => {
let component: SaleReportComponent;
let fixture: ComponentFixture<SaleReportComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [SaleReportComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [SaleReportComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SaleReportComponent);

View File

@ -6,13 +6,11 @@ describe('TaxReportComponent', () => {
let component: TaxReportComponent;
let fixture: ComponentFixture<TaxReportComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [TaxReportComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [TaxReportComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TaxReportComponent);

View File

@ -6,13 +6,11 @@ describe('UserDetailComponent', () => {
let component: UserDetailComponent;
let fixture: ComponentFixture<UserDetailComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [UserDetailComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [UserDetailComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(UserDetailComponent);